I have this example:
What can i do if i dont want test1 to be 1 then I call the testfunction?
Sorry for the variable but I'm not good for find names for varibles,
C#:
class testclass
{
public int i;
public testclass(int i)
{
this.i = i;
}
}
class Class1
{ [STAThread]
static void Main(string[] args)
{
testclass test1 = new testclass(0);
testfunction(test1);
Console.Write(test1.i);
Console.Read();
}
static void testfunction(testclass test2)
{
testclass test3 = test2;
test3.i++;
}
}
What can i do if i dont want test1 to be 1 then I call the testfunction?
Sorry for the variable but I'm not good for find names for varibles,