C#里面比较时间大小三种方法
来源:互联网 发布:淘宝图库南通实战王 编辑:程序博客网 时间:2024/06/10 05:07
string st1="12:13";
string st2="14:14";
DateTime dt1=Convert.ToDateTime(st1);
DateTime dt2=Convert.ToDateTime(st2);
DateTime dt3=DateTime.Now;
if(DateTime.Compare(dt1,dt2)>0)
msg.Text=st1+">"+st2;
else
msg.Text=st1+"<"+st2;
msg.Text+="/r/n"+dt1.ToString();
if(DateTime.Compare(dt1,dt3)>0)
msg.Text+="/r/n"+st1+">"+dt3.ToString();
else
msg.Text+="/r/n"+st1+"<"+dt3.ToString();
string st2="14:14";
DateTime dt1=Convert.ToDateTime(st1);
DateTime dt2=Convert.ToDateTime(st2);
DateTime dt3=DateTime.Now;
if(DateTime.Compare(dt1,dt2)>0)
msg.Text=st1+">"+st2;
else
msg.Text=st1+"<"+st2;
msg.Text+="/r/n"+dt1.ToString();
if(DateTime.Compare(dt1,dt3)>0)
msg.Text+="/r/n"+st1+">"+dt3.ToString();
else
msg.Text+="/r/n"+st1+"<"+dt3.ToString();
- C#里面比较时间大小三种方法
- C#里面比较时间大小三种方法
- C#里面比较时间大小三种方法
- C#里面比较时间大小三种方法
- C#里面比较时间大小三种方法
- C#里面比较时间大小三种方法
- C#里面比较时间大小三种方法
- C#里面比较时间大小三种方法
- C#里面比较时间大小三种方法
- C#里面比较时间大小三种方法
- C#里面比较时间大小三种方法
- C#里面比较时间大小三种方法
- C#里面比较时间大小三种方法
- C#里面比较时间大小三种方法
- C#里面比较时间大小三种方法
- C#里面比较时间大小三种方法
- C#里面比较时间大小三种方法
- C#里面比较时间大小三种方法
- 简单CSS hack
- 《现实…》
- 重新开始
- 学车
- Java与.NET谁是未来
- C#里面比较时间大小三种方法
- 对话框全接触
- C#操作注册表
- 最近正在纠结的事
- [转]一位软件工程师的6年总结
- WinForm中接收键盘按键
- 高性能网站建设之 MS Sql Server数据库分区
- Web.config详细讲解
- ASP.NET中常用的26个优化性能方法