C# for Java Developers, Part I.

If all the planets align correctly, and World War III doesn’t break out, I might be dabbling in C# within the next 12 months. But I’m a hard core Java developer. How do I effectively learn C# while at the same time staying sane? Here’s my quick and dirty C# for Java Developers guide.

C# (pronounced see sharp) first appeared in the year 2000, 5 years after Java. It’s currently at version 7, which was released in March this year. The language is similar to Java in many ways, but it’s also very different. Both Java and C# are typed statically and strongly, object orientated, use curly braces to define scope, and semi colons to indicate line endings. While they have similar syntax, the C# syntax differs enough from Java that it might look a bit confusing to a long time Java developer at first sight.

The structure of this guide is as follows: Each hand picked topic consists of three sub sections. One code sample from each camp, and then some quick bullet points that cover what I consider the most important takeaway from the particular subject. All code you see is also available in the C# for Java Developers GitHub repository.

A word of warning: I’m writing this guide as I learn C# myself, so don’t except everything to be 100% accurate. Consider reading this as a way to kick start your own C# adventure.

Without further ado, let’s jump in the deep end of the pool.

Continue reading "C# for Java Developers, Part I."