Mark R. Dawson said:
Hi Eduardo,
make the form which you want to get the variable from have a public
property that exposes the variable, you can then get it from the other
form
i.e
class Form1 : Form
{
private int _myInternalNumber = 5;
public int TheNumber
{
get
{
return _myInternalNumber;
}
}
}
Then form2 would do something like:
Form1 f1 = new Form1();
int TheNumberFromForm1 = f1.TheNumber;
Hope that helps
Mark R Dawson