For proper encapsulation, should I use a private property with a manual getter method like in Java:
public class Foo { private int Prop { get; set; } public Foo { Prop = 1; } public int GetProp() { return Prop; } } Or should I simply use a public property?
public class Foo { public int Prop { get; private set; } public Foo { Prop = 1; } }
public int Prop { get; }proper encapsulation? There is no such thing. What is the context?proper encapsulationis encapsulation good practices I'd say.