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...
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
VulpesPosted Jul 11, 2012, 6:59 AM
Assume that Swap is a public or internal method on Form2:
Form2 f2 = (Form2)Application.OpenForms["Form2"];
f2.Swap(ref a, ref b);