当前位置:首页
开发技术指南» 文章正文
    引言:
 

 

    摘要: 只缺一张暂住证 一大学毕业生竟遭毒打致死 -------------------------------------------------------------------------------- http://news.tom.com 2003年04月25日10时03分来源:南方都市报 孙志刚是学美术的,他家人手中拿着的是孙志刚生前的自画像。 点击观看更多精彩社会新闻 3月......
 ·关于值班的一个难题    »显示摘要«
    摘要: 在设计程序的时候需要设计一个算法: 一个部门的排班按照43215的顺序值班。 时间为8--18 18:到第二日8:00 假设2003.04.25日 8到18点为第4班,请问如何设计这个排班表~~~ ......


为何不能取得命令行参数

//   ProcessTest.cs  
  using   System;  
  using   System.Diagnostics;  
   
  public   class   Hello4  
  {  
  public   static   int   Main(string[]   args)  
  {  
  Process   myProcess1   =   new   Process();  
  myProcess1.StartInfo.FileName   =   "notepad";  
  myProcess1.StartInfo.Arguments   =   "c:\\boot.ini";  
  myProcess1.StartInfo.WindowStyle   =   ProcessWindowStyle.Maximized;  
  myProcess1.Start();  
   
  Process[]   myProcesses;  
  myProcesses   =   Process.GetProcessesByName   ("notepad");  
  foreach(Process   myProcess   in   myProcesses)  
  {  
  Console.WriteLine   ("_"   +   myProcess.ProcessName   +   "_");  
  Console.WriteLine   ("_"   +   myProcess.StartInfo.Arguments   +   "_"); /*   为什么为空,而不是c:\boot.ini   */  
  Console.WriteLine   ("_"   +   myProcess.StartInfo.FileName   +   "_"); /*   也为空???   */  
  }  
   
  return   0;  
  }  
  }

NO.1   作者: Knight94

StartInfo应该是传给进程Start,进程运行以后,要获得信息应该用myProcess.MainModule,例如获得文件名用myProcess.MainModule.FileName。


    摘要: 问个超级难题:能在显示器上显示出红处线吗? 嘿嘿 ......
» 本期热门文章:

©2000-2007 All Rights Reserved. 最佳浏览:1024X768 MSIE