Created
January 5, 2021 07:45
-
-
Save MarshalOfficial/f68d4e9cf04578a95dab7e0e78bf0ede to your computer and use it in GitHub Desktop.
run a cmd command in c#
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| public static void RunCmd(string command) | |
| { | |
| System.Diagnostics.Process proc = new System.Diagnostics.Process(); | |
| proc.StartInfo.FileName = "app name like bcp"; | |
| proc.StartInfo.Arguments = command; | |
| proc.Start(); | |
| proc.WaitForExit(); | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment