Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations MikeeOK on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Invoke any method of Console application

Status
Not open for further replies.

scorpion1974

Programmer
Mar 21, 2004
7
US
Hi,
I want to know how to invoke any method written in Console application from other application like Windows Class library?
e.g.
Console Application
------------------
public static void Main(){}
public CallRemoteObject(){}

Windows Class Library
----------------------
want to invoke CallRemoteObject() method.

Thank you in advance.
 
Look at the DllImport function to import the appropriate .dll and then call the function.

-----------------------------------------------
"The night sky over the planet Krikkit is the least interesting sight in the entire universe."
-Hitch Hiker's Guide To The Galaxy
 
Use of delegate and BeginInvoke function ....
Used it while calling function across workspaces (in threads) .Hope it can be useful to you

Again should be within the same project.
 
Move CallRemoteObject into it's own class library, so that you can call it from both solutions.

Chip H.


If you want to get the best response to a question, please check out FAQ222-2244 first
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top