NETFramework类库..doc

  1. 1、本文档共7页,可阅读全部内容。
  2. 2、原创力文档(book118)网站文档一经付费(服务费),不意味着购买了该文档的版权,仅供个人/单位学习、研究之用,不得用于商业用途,未经授权,严禁复制、发行、汇编、翻译或者网络传播等,侵权必究。
  3. 3、本站所有内容均由合作方或网友上传,本站不对文档的完整性、权威性及其观点立场正确性做任何保证或承诺!文档内容仅供研究参考,付费前请自行鉴别。如您付费,意味着您自己接受本站规则且自行承担风险,本站不退款、不进行额外附加服务;查看《如何避免下载的几个坑》。如果您已付费下载过本站文档,您可以点击 这里二次下载
  4. 4、如文档侵犯商业秘密、侵犯著作权、侵犯人身权等,请点击“版权申诉”(推荐),也可以打举报电话:400-050-0827(电话支持时间:9:00-18:30)。
查看更多
NETFramework类库.

.NET Framework类库 .NET 是微软公司最新推出的软件开发平台,该平台由CLR和.NET类库组成。该类库功能十分完善,可以简化编程工作,在程序中应尽可能采用类库。 在程序中使用命名空间时,除了默认导入的命名空间可以直接使用外,其他的命名空间还需要使用using导入之后才能使用。 System:包含有许多常用的基本类,是默认导入的命名空间。 System.data:包含ADO操作的相关类,是默认导入的命名空间。 System.data.oledb:包含OLE DB.NET连接类。非默认导入的命名空间。 数学运算类 protected void Page_Load(object sender, EventArgs e) { Response.Write(br abs(-4)的值是:); Response.Write(Math.Abs(-4)); Response.Write(br sign(-2.4)的值是:); Response.Write(Math.Sign(-2.4)); Response.Write(br max(5,7)的值是:); Response.Write(Math.Max(5, 7)); Response.Write(br ceiling(2.4)的值是:); Response.Write(Math.Ceiling(2.4)); Response.Write(br floor(-2.8)的值是:); Response.Write(Math.Floor(-2.8)); Response.Write(br round(4.5001)的值是:); Response.Write(Math.Round(4.5001)); } 字符串操作类 protected void Page_Load(object sender, EventArgs e) { string stra = 真有趣; string strb = ASP.NETFHW 真有趣; Response.Write(stra内容为:); Response.Write(stra + ); Response.Write(brstra的长度为: + stra.Length.ToString()); Response.Write(brnet的位置是:+stra.IndexOf(net).ToString()); Response.Write(bra串与b串比较的结果为:+stra.CompareTo(strb).ToString()); Response.Write(bra 串与b串是否相等+stra.Equals(strb).ToString()); } 日期、时间类 日期、时间类System.DataTime也是属于system命名空间 protected void Page_Load(object sender, EventArgs e) { DateTime date1 = DateTime.Now; DateTime date2 = new DateTime(2008, 08, 08, 08, 08, 08, 08); Response.Write(brdate1.date的值为 + date1.Date.ToString()); Response.Write(brdate1.year的值为 + date1.Year.ToString()); Response.Write(brdate1.month的值为 + date1.Month.ToString()); Response.Write(brdate1.day的值为 + date1.Day.ToString()); Response.Write(brdate1.timeofday的值为 + date1.TimeOfDay.ToString()); Response.Write(brdate1.hour的值为 + date1.Hour.ToString()); Response.Write(brdate1.minute的值为 + date1.Minute.ToString()); Respon

文档评论(0)

xznh + 关注
实名认证
内容提供者

该用户很懒,什么也没介绍

1亿VIP精品文档

相关文档