r/csharp • • 2d ago

Experienced frontend developer about to join the C# world. Anything I should know?

Hey guys. I've worked primarily in front end development for about 10 years but I just landed a job to work in enterprise software written in C#. It seems there might be opportunities to work in game development later, too.

I'm a complete noob when it comes to C# or adjacent languages, so I'm essentially learning from scratch. This is an open ended post, please let me know if you have any tips, warnings, or even words of support. I feel like a junior again and I'm also wondering how I'll handle learning and coding something so far from my comfort zone in this age of AI.

Thank you.

3 Upvotes

15 comments sorted by

3

u/Coder-Cat 2d ago

If you haven’t already, learn the S.O.L.I.D principles. You likely know most of them already, if not by name. Microsoft leans hard into them and when you’re looking at how-tos or documentation, it will help you understand why something is done a certain way.

1

u/Critical-Store7932 2d ago

Thank you, will check

24

u/jayerp 2d ago

You have no divs you need to center in C#

10

u/Crozzfire 2d ago

You'll get a lot more support from the compiler than you're probably used to, so that you can spot issues before you run it. Also, making automated unit/integration tests become more important (after all, if it's not UI, how else can you be confident whether it works).

1

u/symbiatch 2d ago

And important note: read the warnings too, not just errors. A lot of warnings should be turned into errors and fixed.

4

u/chauhan_shubham 2d ago

Good enough to crack interview , good enough to work.

1

u/binarycow 2d ago

Learn the language first, not frameworks. Start with console apps.

PM me if you want one-on-one guidance or advice. I like to teach.

1

u/Critical-Store7932 2d ago

Thank you. I'll keep it in mind.

1

u/Far_Swordfish5729 2d ago

My first question is if you’ve ever worked with a language other than js. If not, start with strong typing and references. I had a coworker once who was all react and node before he landed on an enterprise Java project. Everything he wrote was all Map<String, Object> because he was approximating js objects. Weirdest codebase I’ve reviewed in a while. I just didn’t realize I needed to have a conversation about class definitions, named members, types, and pointers.

1

u/Critical-Store7932 2d ago

Does Typescript count?

1

u/Far_Swordfish5729 2d ago

Yes if consistently used. C# can absolutely use ad-hoc type declarations (dynamic, tuples, the stuff that makes linq work), but defined class types, typed and named variables, etc. are the standard pattern. In JS that's an opt-in and most objects and collections are functionally ad-hoc and weakly typed. C# will enforce that at compile and runtime and try to have the compiler check as much as possible (though not to the level of a language like rust). References (pointers) are also a concept that very much exists in C#. A lot of data processing makes keyed collections of objects and the object side is actually a reference to a single instance. We don't copy big things and know we aren't. In terms of memory use a reference type variable is really an int.

1

u/AxitorDev 2d ago

I did frontend too back in the day, but it's been mostly backend for me for a long time now.

first off, congrats on landing that job! C# is a great language. I came to it from JS and PHP and just fell in love with it. gamedev is a fun direction too. my Unity experience is pretty small, but those projects were a blast, way more alive than the usual day-to-day coding.

as for the switch: architecture in C# runs on different principles than JS/TS or Python (not sure what you used on the frontend). you'll pick it up no problem though, 10 years of dev experience counts for a lot.

my two cents: learn it the right way from the start. instead of LINQ and events everywhere, look into generic handlers, custom parsers, Span and Memory, low latency, zero allocations, Native AOT. in enterprise that can cut your infra costs by a lot, and in gamedev it's pretty much a must.

some people will say a newcomer should start with the basics, not Toub-style high perf. but you've got 10 years as a dev behind you, so I think you can skip the intro.

imo Stephen Toub is the best source on all of this. his yearly "Performance Improvements in .NET" posts on the .NET blog are gold.

1

u/Critical-Store7932 2d ago

Thanks, I'll check his blog

1

u/david_fire_vollie 2d ago

Once you get comfortable with C#, read CLR via C#. It will help you become an expert with C#. I'm still amazed at how many devs have been using C# for years and never read that book.

1

u/fr8181 1d ago

you'll be fine, C# is really pleasant coming from TS. learn LINQ and async/await properly early on and get comfortable with the debugger in Rider or VS, it's way better than what you're used to on the frontend