摘要:
我想问个问题啊 为什么 代码贴过来以后 没有自动缩进了呢 我郁闷的 前面的都还好好的。现在怎么没了呢 !这段代码的 关键 还是在于对正则表达式的理解!@"^[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#_初学者
阅读(1440)
推荐(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#_初学者
阅读(416)
推荐(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.Globalization;namespace Example51{ public partial class Form1 : Form { public Form1() { Ini...
阅读全文
posted @ 2011-10-23 17:33
C#_初学者
阅读(347)
推荐(0)
摘要:
效果图:原理:在所有要丢失精度的小数位中加5,大于10进位代码: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 Example48{ public partial class Form1 : Form { public Form1() { Initi...
阅读全文
posted @ 2011-10-23 13:37
C#_初学者
阅读(277)
推荐(0)
摘要:
TryParse方法首先会尝试将字符串转换为指定数值类型,如果转换成功 则 返回 True 并对参数中变量赋值。 否则 返回False 语法如下:double.TryParse(string str, out double result);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;name
阅读全文
posted @ 2011-10-23 13:15
C#_初学者
阅读(245)
推荐(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 Example46{ public partial class Form1 : Form { public Form1() { InitializeComponent(); } pr...
阅读全文
posted @ 2011-10-23 12:33
C#_初学者
阅读(282)
推荐(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.Text.RegularExpressions;namespace Example44{ public partial class Form1 : Form { public Form1() { ...
阅读全文
posted @ 2011-10-21 00:21
C#_初学者
阅读(336)
推荐(0)