c# - I want to delete multiple lines of file's output .which file is redirected -


i want delete multiple string lines of files output.which file redirected. code follows.

static void main(string[] args) {     system.diagnostics.process p = new system.diagnostics.process();     p.startinfo.filename = "cmd ";     p.startinfo.useshellexecute = false;     p.startinfo.arguments = "/c ipconfig";     p.startinfo.redirectstandardoutput = true;     p.start();     string output = p.standardoutput.readtoend();     p.waitforexit();     console.writeline(output);     console.readline(); } 

output : give correct answer.but want ip address of m/c. other lines deleted. please give answer of question changes of code.

do need run ipconfig? networkinterface class should able provide information looking without requiring run external process , parse text.


Comments

Popular posts from this blog

linux - Mailx and Gmail nss config dir -

c# - Is it possible to remove an existing registration from Autofac container builder? -

php - Mysql PK and FK char(36) vs int(10) -