Where do I code?!
Hello a little query!
I just started learning C#, it's my second language let's say. Other than that I've strong knowledge of python which I always wrote in vsc
For C#, I downloaded VS for the first time yesterday however I couldn't make myself fit into it lol it all seemed a lot more complicated and uneasy compared to VSC so I downloaded some extensions into vsc to make c# work there. Frankly I've only worked with vsc so far for all my projects
Did some research and found out the core differences between VS and VSC, however would still like someone to tell me if I'm all good sticking to vsc for now/for long term or if I should root out and start writing in vs :muidead:
23 Replies
VSCode is generally not the best experience, especially for a newbie
Yes, I got that impression the first time I rolled in lmao
thats why I looked up if I can write in vsc instead
looks all decent
Aside from that
List<object>
and indented namespaces, yeah
If you feel good with VSC, sure, go ahead and use it as long as you have DevKit installed as well
You will run into issues, thoughI believe I just got it
I think I already did, had to put these symbols do they dont show error https://prnt.sc/hM8CThjU2Dp9
it shows it this way
Why would it show an error?
Ah, I see what you mean
Well not really an error as it runs the code regardless but i dunno its highlighted with yellow
It's not an issue with VS Code though
oh
it didnt show that when i pasted the same code in vs
Perhaps VS was configured differently?
As long as it's a recent version, it should show warnings about nullability like those
What do you mean by that? the List object type specifically
It's not a list of objects, it's a list of strings
Be specific
object
should generally be avoided if possible
And dynamic
outright bannedAh right, I first made it string
but then tried putting some bools etc into it didn't work, so I turned it to object
I see
Well, yeah, C# is strongly and statically typed, it's not like Python or Javascript
If a collection is of strings, it is a collection of strings period
Can't have a bool or int there
Right, if I wanted to make a list like
list = [True, 4.5, 5, "hello"]
id have to make it object? and ONLY when im really making a list like that
You should rethink what you're doing instead
There's little to no reason to have a collection of varied types
makes sense, and how about dictionaries
Same. One type of key, one type of value
If it's a
Dictionary<string, Person>
, the keys are all strings and the values are all Person
sAlright I'll keep that in mind