PInvokeStackImbalance ao usar o "sistema estático extern int (string str)"
Eu estou tentando usar o comando de sistema (string str) para dos-operações em c #.
namespace XYZ
{
internal class Program
{
[DllImport("msvcrt.dll")]
static extern int system(string str);
static void Main(string[] args)
{
string Command = Console.ReadLine();
system(Command);
/* Excutes command, then "PInvokeStackImbalance". */
}
}
}
Eu sei usarstatic extern int system(string str)
é uma solução ruim, mas eu tentei outras soluções que não funcionavam.