2009年3月24日

[转]在C#里,如何执行cmd里的常用dos命令

摘要: using System;using System.Diagnostics;namespace Tipo.Tools.Utility{/// <summary>/// 常用Dos命令操作/// </summary>public class DosCommand{private Process process=null;private string _errmsg;public DosCommand(){process = new Process();process.StartInfo.FileName = "cmd.exe";process.Star 阅读全文

posted @ 2009-03-24 14:09 小灰熊 阅读(395) 评论(0) 推荐(0) 编辑

[转]C#中使用TimeSpan计算两个时间的差值

摘要: DateTime ts1 = DateTime.Parse("2008-6-1");DateTime ts2 = DateTime.Parse("2008-6-5");TimeSpan ts = ts1.Subtract(ts2).Duration();//Response.Write(ts.Days.ToString()+"天"+ ts.Hours.ToString()+"小时"// + ts.Minutes.ToString()+"分钟"+ ts.Seconds.ToString()+&qu 阅读全文

posted @ 2009-03-24 14:08 小灰熊 阅读(528) 评论(0) 推荐(0) 编辑

导航