这是我的代码。在c中创建动态数组#
System.Diagnostics.Process p = new System.Diagnostics.Process();
p.StartInfo.FileName = "cmd ";
p.StartInfo.UseShellExecute = false;
p.StartInfo.Arguments = "/C net view";
// p.StartInfo.RedirectStandardOutput = true;
p.Start();
char[] delimiterChars = { '\\' };
// List<string> serverNames = new List<string>();
string input = "\\ABC-PC,\\ADMIN,\\ANUSHREE-PC,\\MANISHA-PC";
List<string> serverNames = input.Split(',').ToList();
// System.Console.WriteLine("Original input: '{0}'", input);
全部\\
删除输出中的字符。 &仅提取服务器名称。因此创建动态数组。 &这个数组被拆分&解析。我能怎么做?请给出解决方案&代码的更改。