I know the title might not be clear and I apologize about that. so I have 2 forms in visual studio and in the first form user logs in to the system and the second form is where everything else happens.
I have called a class called info
in the first form, and the class is responsible to gather user info and check for login etc. when a user logs into the system, the class takes the user ID and stores it into a private string. and from there the program goes into the second form.
now here is my question, how can I make this class global so I can access the stored userID from the second form? can I just create another instance of the class (info myinfo = new info()
) ?
PS I am new to object oriented concept so Please user easy terms.