News for hackers. Stuff that matters.
Re:Everything about Java 8 by gjulianm on Wednesday March 27, 2013 @07:58PM (#5452697)
In C#, properties are handled just like fields:

    class Foo {
       public string Bar { get; set; }
    }

    Foo.Bar = "test";
But I still don't get why wouldn't you use getters/setters or properties. For example, let's say you want to get the number of items in a list. How'd you do it without something like this

    public int Count { get; private set; }

?

There are no comments on this comment yet.