C
C#7mo ago
Zeksy

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
Angius
Angius7mo ago
VSCode is generally not the best experience, especially for a newbie
Zeksy
ZeksyOP7mo ago
Yes, I got that impression the first time I rolled in lmao thats why I looked up if I can write in vsc instead
Zeksy
ZeksyOP7mo ago
Lightshot
Screenshot
Captured with Lightshot
Zeksy
ZeksyOP7mo ago
looks all decent
Angius
Angius7mo ago
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, though
Zeksy
ZeksyOP7mo ago
I believe I just got it
Zeksy
ZeksyOP7mo ago
I think I already did, had to put these symbols do they dont show error https://prnt.sc/hM8CThjU2Dp9
Lightshot
Screenshot
Captured with Lightshot
Zeksy
ZeksyOP7mo ago
Lightshot
Screenshot
Captured with Lightshot
Zeksy
ZeksyOP7mo ago
it shows it this way
Angius
Angius7mo ago
Why would it show an error? Ah, I see what you mean
Zeksy
ZeksyOP7mo ago
Well not really an error as it runs the code regardless but i dunno its highlighted with yellow
Angius
Angius7mo ago
It's not an issue with VS Code though
Zeksy
ZeksyOP7mo ago
oh it didnt show that when i pasted the same code in vs
Angius
Angius7mo ago
Perhaps VS was configured differently? As long as it's a recent version, it should show warnings about nullability like those
Zeksy
ZeksyOP7mo ago
What do you mean by that? the List object type specifically
Angius
Angius7mo ago
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 banned
Zeksy
ZeksyOP7mo ago
Ah 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
Angius
Angius7mo ago
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
Zeksy
ZeksyOP7mo ago
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
Angius
Angius7mo ago
You should rethink what you're doing instead There's little to no reason to have a collection of varied types
Zeksy
ZeksyOP7mo ago
makes sense, and how about dictionaries
Angius
Angius7mo ago
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 Persons
Zeksy
ZeksyOP7mo ago
Alright I'll keep that in mind
Want results from more Discord servers?
Add your server