For part of a C# application I am executing some relatively simple networking commands. (ping, ipconfig, tracert, nslookup, etc.)
I have read this answer on when to use C# vs CMD/PowerShell in the general sense: https://stackoverflow.com/a/4188135/8887398
However, I'm wondering particularly for networking, and the Systems.Net library, is there any major advantage in taking the time to write code to implement these in C# as opposed to creating a new command line Process()
within a C# app and executing it that way? (The Process()
route is really simple/easy to code within C# app)
Question: What are my main advantages of implementing networking commands with the C# Systems.Net library vs creating a new Process()
within a C# app and proceed internally as if you were using the command line?