pass parameter values to dll


Well-known member
Nov 13, 2012
Programming Experience
I have a C# 2008/2010 application that is currently accessed as an exe file. I would like to change the application that calls the program in a 'faster and/or better' manner. The contract shop that saw the code says there is a 'faster and/or better' method but I do not know what that method would be. The contract shop went out of business so I can not ask them this question.

The code in the calling program looks like the following:

strConsoleAppLocation = ConfigurationManager.AppSettings["dll_location"];
string Process_Arguments = null;
Process RPT_Process = new Process();
RPT_Process.StartInfo.FileName = strConsoleAppLocation;
Process_Arguments = " 7 " + strCUSTID + " 1";
RPT_Process.StartInfo.Arguments = Process_Arguments;

Thus can you tell or show me code on how to access this code in a 'better or faster' manner from the calling program?
Last edited:
If you're executing an external program then there's not really any better or faster way to send it simple parameter values than what you're already doing. I see that you've asked a related question in another thread. If you're referencing this assembly as a DLL then you will be creating instances of the types it contains and invoking their members in exactly the same way as you do for types and members in your own project. Calling a method and passing an argument is the same regardless of where that method is.
Top Bottom