您的位置:首页 > 编程语言 > C#

C#学习中遇到的问题

2008-02-21 18:17 267 查看
在C#学习中遇到的问题集中在此,若有高人看见希望给出解决办法,在日后的学习中本人若找到解决办法,也在此更新!

======================================================================================

1、如何实现ipconfig /all命令的全部功能 

     #region     另类解法:(程序如下) 

     System.Diagnostics.Process   p=new   System.Diagnostics.Process();   
      p.StartInfo.UseShellExecute=false;   
      p.StartInfo.RedirectStandardInput=true;   
      p.StartInfo.RedirectStandardOutput=true;   
      p.StartInfo.CreateNoWindow=true;   
      p.StartInfo.FileName="ipconfig.exe";   
      p.StartInfo.Arguments   =   "/all";   
      p.Start();   
      string   Text=p.StandardOutput.ReadToEnd();   
      p.WaitForExit();  

     #endregion
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签:  c# string