Why is this:
public myClass
{
private int myVariable { get; set; }
myClass.myVariable = 10;
}
better than this?
public myClass
{
int myVariable = 10;
}
What is the difference? Are they interchangeable?
Why is this:
public myClass
{
private int myVariable { get; set; }
myClass.myVariable = 10;
}
better than this?
public myClass
{
int myVariable = 10;
}
What is the difference? Are they interchangeable?