Is there an option to do one setter/getter for two variables? Or the only option are two separate setter/getter's like this:
int var1;
int var2;
public int var1
{
get { return var1; }
set { var1 = value; }
}
public int var2
{
get { return var2; }
set { var2 = value; }
}
You can try this
public int var1 { get;set;}
public int var2 { get;set;}