Then don't comment. Your comment is comparing something you know to something you have no idea about. How can anyone legitimately make such a comparison?
Scala,Groovy,Xtend,etc... there is enough languages on the jvm one doesnt have to use any MS related tech.
A language is much more than just syntax.
With mono, one ends up writing C# code similar to C and C++, with #ifdefs, or having to search for .NET libraries that are cross platform.
UI for example. Pure Java UIs plain suck; you can use Gtk# in C# for the same thing, but none will be up to the platform's UI standards.
Besides, the JVM isn't available on iOS and Android, so it isn't universally available either.
For example, Foo.X might be an x position, returned from a getter method, and set with a setter method. Internally, the class make use the Foo.x field to store it, in which case the getter and setter are trivial. In fact, C# will write them for you The property could look like:
int X{
get;
set;
}
(Though my syntax might not be completely correct, I haven't used C# in a while). C# will automatically create a private field to store the value for x, and the getter and setter will work as expected.Classes should, as a general rule, only expose properties and methods to the outside world. All fields should be private. Yes, accessing a property calls a method, but so does a Java getX().
Java uses the same rule, except getters and setters are implemented using setX(int) and getX(). C# properties are the equivalent. The client of a class should not care how the class stores values, but that the getters and setters work.
If only. In http://msdn.microsoft.com/en-us/library/vstudio/ms229043%28v..., Microsoft advocates:
"The PascalCasing convention, used for all identifiers except parameter names, capitalizes the first character of each word"
Also, as the guy below me pointed out, by convention you know that Foo is a property.
Your application shouldn't hang from a database call when you pull a property from an object. And obviously, methods doing such things should be documented appropriately.