Declare the variable as static in form1. so that you can access it from any form using the form name.
in form1
public static string var;
from any other form access it as
form1.var
As it is a static member you can refer to it by class name. Object.reference is not required.
Quote:
quote:Originally posted by dzisaacs
if a have a variable in form1, how can i use that variable on form2??
|
dev(1);