C#
文章平均质量分 65
thomasking
无
展开
-
C# 运算符
运算符类别 运算符 算术 + - * / % 逻辑(布尔型和按位) & | ^ ! ~ &&转载 2008-04-22 10:37:00 · 204 阅读 · 0 评论 -
C#转义符
转义符 字符名/ 单引号/" 双引号// 反斜杠/0 空字符/a 感叹号(Alert )/b 退格/f 换页/n 新行/r 回车/t 水平 tab/v 垂直tab转载 2008-08-01 10:03:00 · 261 阅读 · 0 评论 -
C#中的日期比较
在ASP中日期比较使用:DateDiff( "d", "2006-1-30", now )>0;在C#中使用:TimeSpan代码如下:using System;using System.Collections;public class DatediffClass{ public static void Main() { DateTime dt1 = DateTime.Parse("2006转载 2008-05-24 14:48:00 · 409 阅读 · 0 评论 -
String.IsNullOrEmpty 方法
注意:此方法在 .NET Framework 2.0 版中是新增的。 IsNullOrEmpty 是一种简便方法,它使您能够同时测试 String 是否为 空引用(在 Visual Basic 中为 Nothing) 或其值是否为 Empty。// This example demonstrates the String.IsNullOrEmpty() methodusing System转载 2008-08-26 10:34:00 · 859 阅读 · 0 评论 -
C#中StringBuilder类的使用
String 对象是不可改变的。每次使用 System.String 类中的方法之一时,都要在内存中创建一个新的字符串对象,这就需要为该新对象分配新的空间。在需要对字符串执行重复修改的情况下,与创建新的 String 对象相关的系统开销可能会非常昂贵。如果要修改字符串而不创建新的对象,则可以使用 System.Text.StringBuilder 类。例如,当在一个循环中将许多字符串连接在一起时,转载 2008-08-26 10:37:00 · 324 阅读 · 0 评论