I am writing a C# program which tells the Active Connections (Protocal, Local Address , Foreign Address , State , Process Id ) . To do this I am running cmd.exe as a process and passing netstat -ano as an argument.
System.Diagnostics.Process.Start("cmd.exe","netstat -ano");
This returns Active connections .
But I don't want to use this netstat command .
Is there any alternative for netstat.exe in C# ?
Any library or something else so that I can get the same output ?