Skip to content

Instantly share code, notes, and snippets.

@atwayne
Last active August 16, 2022 17:23
Show Gist options
  • Save atwayne/0f98d4bac07a3f33439c35da247e4fcd to your computer and use it in GitHub Desktop.
Save atwayne/0f98d4bac07a3f33439c35da247e4fcd to your computer and use it in GitHub Desktop.
executes a string as an internal operating system command
using System.Runtime.InteropServices;
[DllImport("msvcrt.dll")]
static extern int system(string command);
// Ref: https://docs.microsoft.com/en-us/cpp/c-language/system-function?view=msvc-170
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment