What is the best way to achieve this: I have a class with 2 method overloads which I create n object from. If I define b it will used and if not the default. Where/How do I use this default without changing it permanently in the object. What I did is the following but there must be a simpler way.
.
.
.
private int b = 100;
private readonly int defualt_b = 100;
public void Press(int a)
{
...do something...
Send(a, b);
}
public void Press(int a int new_b)
{
...do something...
b = new_b; //set b to be used
Press(a);
b = default_b; //reset back to its default value
}