Why do Java developers need spectacles? In order for them to C#!

0 35
Avatar for GreatWhiteSnark
1 year ago

This week, I started teaching myself C# 7, having found quite a number of free tutorials, including the ones I've linked below. The last time I looked at C#, I was still at varsity (about fifteen years ago, at time of writing), when the impression I got was that it was pretty much just a Java alternative. The language has come a long way since then. So far, I like what I see; it's definitely improved and now has some nifty features (including the var keyword and String interpolation, among other things).

After I've learned the basics/core language, I'm planning to move on to ASP .NET (which I never grasped) and Unity.

If Java is C++ with all the good parts removed and the remainder horribly reinvented (I really dislike Java), then C# looks to be C++ with memory management and other enhancements.

Java:

// has to be told explicitly
ReallyHorriblyLongDataTypeName x = new ReallyHorriblyLongDataTypeName();

// string concatenation
System.out.println("Hello, " + ucFirst(name) + "! Welcome to Java programming.");

C#:

var x = new ReallyHorriblyLongDataTypeName(); // Compiler works it out for itself

// string interpolation (note the use of `$` and braces
Console.Out.WriteLine($"Hello, {UpperFirst(name)}! Welcome to C# programming!");


If you're a fan of C-based languages and strongly-typed languages, wanting to learn something cool, I suggest taking a look at C#. It works on *NIX systems too. MS has instructions for installing it on Debian GNU/Linux and OSX. (Personally, I've had the best results with Mono, despite it not being the easiest collection of packages to install post Debian 7/8 or Ubuntu 16.04).

Below are a number of links to C# tutorials. (I'm not sure if the Codecademy one is free, but there is a "Pro" version that provides a certificate of completion, which might be worth obtaining.)

There are, of course, more sites offering C# tutorials for free (including W3Schools, of which I am wary), some even including university/varsity courses (but the above links should give beginners a good start before they embark on that level of commitment).

1
$ 0.00
Sponsors of GreatWhiteSnark
empty
empty
empty
Avatar for GreatWhiteSnark
1 year ago

Comments