0

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?

0 Answers0