摘要: //取得某月的最后一天 //方法一:使用算出該月多少天,年+月+加上多少天即得,舉例取今天這個月的最后一天 private void GetLastDateForMonth(DateTime DtStart, out DateTime DtEnd) { int Dtyear, DtMonth; DtStart = DateTime.Now; Dtyear = DtStart.Year; DtMonth = DtStart.Month; int MonthCount = DateTime.DaysInMonth(Dtyear, DtMonth);//計算該月有多少天 DtEnd = Conver 阅读全文
posted @ 2010-04-21 21:08 deepwishly 阅读(4458) 评论(0) 推荐(0) 编辑
摘要: SerialPort 类:表示串行端口资源。属于System.IO.Ports.SerialPort版本信息 .NET Framework受以下版本支持:3.5、3.0 SP1、3.0、2.0 SP1 和 2.0.NET Compact Framework受以下版本支持:3.5 和 2.0主要成员:构造函数:SerialPort()SerialPort(“端口名称”, 波特率, 奇偶校验位,数据位,停止位)以上参数可以在使用前初始化。属性:PortName 获取或设置通信端口,包括但不限于所有可用的 COM 端口。 BaudRate 获取或设置串行波特率。 StopBits 获取或设置每个字节 阅读全文
posted @ 2010-04-21 15:22 deepwishly 阅读(469) 评论(0) 推荐(0) 编辑