Following are some important and key difference in the language C# and Java!!!
#10 – Give me my standard output!
This may not seem like a big deal, but when I’m first getting my head in a language, I want to be able to debug. With everything so new and shiny, I don’t want to hear about the debugger yet, I don’t care about the fancy message boxes, just tell me how to get something on standard output!
In C#, the code looks like this:
Console.WriteLine("your string here");
#9 – Namespaces == Freedom
In Java, the package hierarchical structure mirrored the directory hierarchical structure. This made sense to a degree, but then why didn’t Sun just auto-derive the package structure? Anyway, Microsoft has freed us from this constraint. The C# package structure is defined using namespaces (just like Java), but the namespaces do NOT have to reflect the directory structure.
#8 – What happened to super?
Slight renaming of keywords drives me bonkers! Substitute Java’s
super keyword with
base.