1

Why I shouldn't just make the variable public? To me, it seems much simpler to just do:

public int i;

and then accessing it like a normal variable. What do I get in doing this:

public int i {get; set;}

or even:

public int i;
public int I
{
    get
    {
        return i;
    }
    set
    {
        i = value;
    }
}

And I don't mean in cases where you want to only get or only set, I mean in cases when you want to use it as a normal variable.

Thanks

Fabaki
  • 11
  • 2

0 Answers0