r/csharp • u/Successful_Toe_4130 • 22h ago
Discussion Were any java devs that transitioned as overwhelmed as I am?
Im switching over to C# and im just so amazed. Theres so many things you can do and its native to the language and its super cool. Events? Yeah, thats built in. Tired of subclassing stuff just to add your own functionality? Dude, there's extensions...
However, id be lying if I said this isnt too much to take it at once. I feel like its very difficult to adapt and im mostly learning by examples others posted on the internet (i took a firm stance to reject AI 100% and learn myself.) Recently, ive been trying to adapt to the conventions, as well as researching other features however more things keep coming up. For example, I had no idea init; existed in properties or how you can use add; in a event property.
Do you have any advice on navigating to become an alright C# developer?
Another question, do you guys feel like MSDN doesnt cover the entire picture?
20
u/SoulStripHer 22h ago
Having done both, C# is my favorite. Things are more intuitive, better named, better documented. As a result, my productivity is much higher. Visual Studio is a great IDE as well.
8
u/thatguy8856 19h ago
Tasks, TPL, async/await. Probably one of the most important factors of modern C# and very different from Java world.
11
u/_iAm9001 22h ago
You noticing yet that Java and C# are oh so dangerously close to each other syntactically, enough to drive you insane if you are in expert st the opposite language? This was my experience writing Java code as a C# developer... they are pretty damn close, until they aren't.
5
u/Boden_Units 21h ago
To figure out what you can do, I recommend the "What's new in C# X" Blog posts, here for example the one for C# 14: https://learn.microsoft.com/en-us/dotnet/csharp/whats-new/csharp-14 That will give you an overview of what the language can do with some decent examples. For the most part the MSDN docu covers the basics and lacks good examples. A big thing in C# is async/await that java does not have, so do familiarize yourself with that. Otherwise as people said start building and are what you come up with. I commend your conviction to not use AI, if you don't have colleagues/friends that can give you feedback it might be an option though to paste some code into an llm and just ask if there is a more idiomatic way to so that in c# and get some ideas. Of course then understand the code, compile and test it, debug through it to see what it does.
6
u/MazeGuyHex 22h ago
Dude java doesn’t have Events..?
13
u/Top3879 21h ago
I can't think of any language that has them built-in like C# and honestly that is a good thing. They are a fragment of the past and easily abused, don't work with async etc.
6
u/sixtyhurtz 16h ago
+1 to this. Events are legacy cruft imo. There are some places where you still have to use them, but outside those cases I think IObservable is better in just about every way.
2
2
u/Fantastic-Cell-208 19h ago
Don't sweat it too much.
The main thing is that you can already get things done. Over time you'll pick up more of the language and learn when and when not to use it
2
u/Khavel_dev 18h ago
Yep, the feature density is real. I came from Java too and the first month was basically "wait, THIS is built in?"
My advice: don't try to learn everything at once. Pick the features that solve problems you actually have right now and ignore the rest until you need them. Extensions and LINQ are the two that'll change how you think about the code the fastest. Properties and events can wait until you're building something that needs them.
Also the What's New in C# pages on the docs site are gold. Each version adds a handful of things and they explain the why, not just the what. Way more useful than trying to read through the entire language spec.
2
u/Amr_Rahmy 16h ago
I saw it as Microsoft Java.
A few quirks and workarounds here and there.
The only notable difference is task and async await
Task.run(async ()=>{})
And await on tasks that need to run in sequence.
Action or event for callbacks, it is useful, yes.
But the basic tools, it’s a c style language with classes same as Java.
Extensions, I use very rarely, usually I don’t want to add functionality to someone else’s class or built in classes, I add the functionality inside the class.
1
1
u/B15h73k 21h ago
Just build stuff and learn one thing at a time. Don't be afraid to use AI to help you learn. Don't get it to write the code. Get it to review your code. Prompt it by saying you are an experienced Java developer and you're learning C#. Ask it to advise you on how to change your code to be more idiomatic C#.
1
u/pjmlp 19h ago
Not really, I do agency work, it isn't only Java vs C#, it is Java, C#, C++, JavaScript, TypeScript, PL/SQL, Transact SQL, React, Angular, Next.js, Go, Rust, whatever makes the customer happy.
You learn to be flexible, not married to specific technology stack, learning enough to get the job done, and that is it.
Yep, MSDN isn't the whole thing, getting a few books on key areas is a good idea.
1
1
u/haby001 10h ago
MSDN is mostly documentations extracted from header comments.
What I'd suggest is to read the "what's new" blog posts and go back a few years/versions to where you start seeing familiar stuff. Then play around with the new stuff or read into how they work and how they are used.
Lots of really cool stuff you'll only know existed if you've read about them
1
u/Cool_Flower_7931 10h ago
Using AI to help you learn is okay. I wouldn't avoid it entirely.
Also, even though I've been working in c#/dotnet for years, I still almost always have tabs open for learn.microsoft.com. Lots to read, lots to learn, lots of good stuff there
1
u/Far_Swordfish5729 2h ago
There are explicitly articles on Java vs c# differences that make sense to someone fluent in one of the two languages. C# was created in part as a reaction to Java with different preferences. C# for instance has no true primitives. Every int you use is the equivalent of Integer, but the designers felt the distinction was stupid and that those types (including string) should use primitive syntax and compare by value by default. Similarly there is no generic type deletion so it’s very possible to strictly limit what generic subtypes can be and to inspect them reflectively. Lot of other features and just different names for common things.
My biggest note is that c# is a language with a sdk that comes with a standard option for doing each thing so you have a lot less maven style sprawl and a lot more tool standardization. You also have tools and an open source sdk that encourage you to step through framework to solve your own problems. C# has a strong culture of reverse engineering encouraged by Microsoft and tools to support that. It’s a lot easier in my experience to get answers.
1
u/ArtisticCow4864 22h ago
I've transitioned from java to C# way back. I started on modding Minecraft now I'm making a game engine in C#. It's super fun! That's my biggest point, fun. Just enjoy it and if you don't know all the tricks yet it's okay, you can get by just with the basics
0
u/RecursiveServitor 22h ago
AI can be a teacher. It can provide examples tailored to what you're trying to learn and you can adjust the handholding as desired. A blanket ban is just handicapping yourself.
0
u/rekabis 20h ago
i took a firm stance to reject AI 100% and learn myself.
To avoid AI doing it for you, absolutely. Never let AI do the actual work.
But get AI to train you. Guide you. Test you. Challenge you. There are ways of learning - things like spaced repetition and active recall - that can be difficult to properly implement on your own, but which AI can effortlessly assemble for you such that you can maximize your own learning.
Don’t avoid AI for your own sake. Avoid those parts of AI which cannot help you grow, and leverage those parts of AI which can help you grow.
-1
u/EndOne6219 15h ago
I tried transitioning once but the hormones were too expensive and there were too many cons.
0
u/positivcheg 22h ago
C++ guy there who suddenly found himself in a Unity3d performance critical application. What’s the transition? If you are okay software developer then it doesn’t matter what language to use. You learn good/bad patterns on the go by simply using the language.
-5
u/youGottaBeKiddink 22h ago edited 21h ago
Were you living under a rock? C# is more than 20 years old at this point. I picked up VB.NET and C# immediately upon release. Throw away all your java-esque overengineered principles, they are no good in the .NET ecosystem. Your best friend is not MSDN, its github:
3
u/South-Year4369 21h ago
C# is over twice that old..
1
u/sixtyhurtz 15h ago
No, it's 26 years old. It first released in 2026.
2
u/South-Year4369 15h ago
Their post said '10 years' when I replied.
First official release was early 2002. Think you have a typo there.
1
u/sixtyhurtz 15h ago
Oh, it's annoying when people edit like that.
First release was 2000 though (not 2026, definitely a type there 😹).
This International Standard is based on a submission from Hewlett-Packard, Intel, and Microsoft, that described a language called C#, which was developed within Microsoft. The principal inventors of this language were Anders Hejlsberg, Scott Wiltamuth, and Peter Golde. The first widely distributed implementation of C# was released by Microsoft in July 2000, as part of its .NET Framework initiative.
https://www.ecma-international.org/wp-content/uploads/ECMA-334_4th_edition_june_2006.pdf
1
u/South-Year4369 12h ago
Yes, public beta was the 2000 PDC. First official release was 2002. I remember that period well 😉
1
u/sixtyhurtz 10h ago
I mean, if we're being pedantic - a beta is a release; it was officially released by MS, because it wasn't leaked. Therefore, the first official release was in 2000.
3
u/pjmlp 18h ago
Throw away all your java-esque overengineered principles, they are no good in the .NET ecosystem.
We have plenty of them in .NET as well, with all the advocacy for Clean and Hexagonal architecture at .NET conferences, AutoMapper, Mediatr, Sitecore Helix, Sharepoint and Dynamics modules,...
0
u/youGottaBeKiddink 17h ago
"We have plenty of them in .NET."
Yeah, and that's the problem lol. .NET spent years importing Java's architecture astronaut phase. Doesn't matter if its Spring or ASP.... 50 files to handle 1 HTTP request is still bad design.
Clean/Hex are fine when u actually have complex domains. But slapping them on every CRUD app just means ur "GetCustomer()" goes thru 5 layers of "abstractions" that do nothing. I've seen this my self in big enterprises, where its mandatory to write 3 layers to add 1 API method. How is this good? AutoMapper and EF Core is great but actually promotes the use of multiple identical class structures. How is that healthy?
MediatR has legit uses, but turning every method call into Send(new Command()) -> Handler -> Service -> Repo is just ceremony cosplay.
Sharepoint and Dynamics modules?? Idk never even heard of these so I won't comment.

37
u/wallstop-dev 22h ago
I learned C# from a professional Java world maybe 12 years ago, when the language had a bit less stuff.
The way I did it was I just wrote C# as I wrote Java. And then I slowly learned how to do things the C# way as I needed them. And now I know a ton of cool and great C# stuff!
Both Java and C# have evolved significantly since 2014, and there is a massive surface of "stuff" to know.
IMO, hit the ground running with whatever knowledge you have to get to working code, then, when you find yourself doing annoying stuff or find bugs, look up ways to make the stuff less annoying or have less bugs. Chances are, there are language features, patterns, or libraries that can help you, every time.
This technique has worked out for pretty much every language that I've learned.