I am new to C# and I need to be able to access a declared variable from Form1 to Form2. Variable example:
decimal Total = 0.00M;
Total will increase when user enters items.
I need Form2 to access the variable Total from Form1 once the user is finished entering items and once the user selects the method to pay I can zero Total in Form2.
How can I do this?
If Form1 has a reference to Form2, you can just access it as a variable. Like this: