Jessie,
Make sure your ShowHelp() method is declared as public, then just
instantiate the object in your other class and call the method. Since the
classes are in different .cs files, just make sure that you either put a
"using" namespace statement at the top of the other class, or fully qualify
the namespace of the class you want to instantiate.
example:
public class Class1
{
public void ShowHelp()
{
//code
}
}
public class Class2
{
private void CallOtherMethod()
{
Class1 myObject = new Class1();
myObject.ShowHelp();
}
}
--
Lateralus [MCAD]
"Jessie" <je**********@hotmail.com> wrote in message
news:LX*************@news04.bloor.is.net.cable.rog ers.com...
I defined some functions in one .cs file, i.e. ShowHelp(). Now I need use
them in my other cs files. How to do that?
This is a WinForm application.
Thanks.