Hi
My code is very simple,it's one class with some "public void" methods. I'm using 3 "int" variables in that methods. Problem is that value of variables is not transfering from one to another method.
For example:
public class Alabala
{
int x;
public void ButtonClick()
{
int x=4:
}
public void ButtonClick2()
{
x=x+1
}
message.Text = "x =" + x;
}
Output is: x = 0
That is problem, I cant use my variable!! I want to have
output like this x=5.
I thinlk I was clear
My code is very simple,it's one class with some "public void" methods. I'm using 3 "int" variables in that methods. Problem is that value of variables is not transfering from one to another method.
For example:
public class Alabala
{
int x;
public void ButtonClick()
{
int x=4:
}
public void ButtonClick2()
{
x=x+1
}
message.Text = "x =" + x;
}
Output is: x = 0
That is problem, I cant use my variable!! I want to have
output like this x=5.
I thinlk I was clear