How to call a swap function from from2 to form2
I m new to C#...i want to call a swap function from one form to another form...plse provide me a code for that...thanks in advance...
1 Answer
Know the answer? Post it. Somebody with the same question will find it here.

VulpesRank #55 · 29.2K reputationPosted Jul 11, 2012, 2:59 AM EDT
Assume that Swap is a public or internal method on Form2:
Form2 f2 = (Form2)Application.OpenForms["Form2"];
f2.Swap(ref a, ref b);