Vegard Skjefstad

www.vegard.net

Menu Close

Tag: C#

C# for Java Developers, Part II: Methods

This is the second part of my C# for Java Developers series. Let’s have a look at how to write methods in C#.

Note that this is the second and last post in this series. I’ve decided that there are a lot more interesting languages to learn than C#. The reason I’m finally publishing this second part of the guide – over two years after the first part was published – is that I’m going through my old drafts.

Please consider reading the first part before you jump into this one. All the code you see – and more – is 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.

With that out of the way, let’s have a look at methods.

Read more

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.

Read more

Copyright © 2000-2019 www.vegard.net | Privacy Policy | Statement of Audience | Hosted on vbox4.vbox-host.com