I am new to c# programing.I want function like int system(“command string”) of c++ in c#.
for example: we can execute command on command prompt by using function system("winrm") in c++ where “winrm” is command. system() functon is in stdlib.h header file.
I want to know whether this kind of function is available in c#. if yes let me know.
Or can i use same system() method in c#? if yes,then tell me how to use?
Thank you !!
Seams that you are looking for
Process Class. Info from MSDN:Added after comment.
The simplest way to execute command probably is static method Start(String) of Process class or the other one Start(String, String) that executes application with arguments.
or
The above example gives you more flexibility. E.g. using ProcessStartInfo Class as a parameter to
Startmethod that can redirect an input or output for console applications.