We help IT Professionals succeed at work.

C# - How to get an Instance of a running .Net Winform app and call a method

JElster
JElster asked
on
Hi.
I have an .Net winform app called  TEST.EXE
How can I, from another C# program get a reference to it and call a method on it.
I need to call a method called  RefreshData.

I know I can get the process by doing something like this
Process.GetProcessesByName("TEST");
Comment
Watch Question

Commented:
You can by default to your Console Application pass arguments because the main method takes arguments.

See this:

http://stackoverflow.com/questions/7157454/how-i-create-exe-in-that-i-pass-parameters-in-c-net

Explore More ContentExplore courses, solutions, and other research materials related to this topic.