consider an example : public class MyClass { private int myProperty; public void setMyProperty(int value) { myProperty = value; } public int getMyProperty() { return myProperty; } } This is the same thing in C#: public class MyClass { public int MyProperty {get; set;} }