I have a button click event in class1test where I want to set the value of d_testNumber to 3. Then in class 2test I want to be able to do an if test and if d_testNumber show a message box. My problem is that d_testNumber is always 0 in class 2test. Can someone tell me how to get the value from class 1test d_testNumber to class 2test?
This is in class 1test
:
public int d_testNumber = 0;
Method in class 1test :
void miEditCopay_Click(object sender, Telerik.Windows.RadRoutedEventArgs e)
{
d_testNumber = 3;
}
This is in class 2test:
public int d_testNumber;
Method in class 2test:
public void HelloMessage();
if (d_testNumber == 3)
{
messagebox.show('test worked');
}