丶正则表达式验证手机号码
摘要:我想问个问题啊 为什么 代码贴过来以后 没有自动缩进了呢 我郁闷的 前面的都还好好的。现在怎么没了呢 !这段代码的 关键 还是在于对正则表达式的理解!@"^[1][3-5,8]\d{9}$" 详解@去除后面的转义字符的效果^表示匹配行开始$表示匹配行结束[1]表示第一为数为1 只为1[3-5,8] 表示第二位数字可以 为 3,4,5,8四个中的其中任何一个\d表示匹配数字 注:\还表示转义字符 前面 的@就是为了消除它的效果{9}表示限制符 意即[1][3-5,8]后面可以输入9位数字using System;using System.Collections.Generic
阅读全文
posted @
2011-10-27 22:57
C#_初学者
阅读(300)
推荐(0)
丶如何确定系统的运行时间
摘要:效果图:代码:using System;using System.Collections.Generic;using System.ComponentModel;using System.Data;using System.Drawing;using System.Linq;using System.Text;using System.Windows.Forms;using System.Threading;namespace Example66{ public partial class Form1 : Form { public Form1() { InitializeComponent(
阅读全文
posted @
2011-10-26 23:12
C#_初学者
阅读(294)
推荐(0)
丶根据出生日期计算年龄
摘要:效果图:说明:本实例中使用了VB程序集中DateTime类的DateDiff方法来计算日期的差! 需要引用该类 资源管理器中 右键添加引用 .net页Microsoft.VisualBasic 确定即可 然后在工程文件里 引用 它 using Microsoft.VisualBasic;代码:using System;using System.Collections.Generic;using System.ComponentModel;using System.Data;using System.Drawing;using System.Linq;using System.Text...
阅读全文
posted @
2011-10-26 21:09
C#_初学者
阅读(1441)
推荐(0)
丶设置系统日期时间
摘要:效果图:代码:using System;using System.Collections.Generic;using System.ComponentModel;using System.Data;using System.Drawing;using System.Linq;using System.Text;using System.Windows.Forms;using System.Runtime.InteropServices;namespace Example54{ public partial class Form1 : Form { public Form1() ...
阅读全文
posted @
2011-10-23 19:38
C#_初学者
阅读(452)
推荐(0)
丶动态获取系统当前时间
摘要:效果图:代码:using System;using System.Collections.Generic;using System.ComponentModel;using System.Data;using System.Drawing;using System.Linq;using System.Text;using System.Windows.Forms;namespace Example53{ public partial class Form1 : Form { public Form1() { InitializeComponent(); } ...
阅读全文
posted @
2011-10-23 18:49
C#_初学者
阅读(417)
推荐(0)