
C#专题
石翮
这个作者很懒,什么都没留下…
展开
-
c#变量
1、字段:声明为类型级的变量2、局部变量:在方法中声明的变量3、变量修饰符: interanl new private protected public readonly static这几个修饰符只能用于字段,不能用于局部变量。new修饰符只能用于从其他类继承而来的类,并隐藏该类中已有的字段。readonly只能在声明变量的时候初始化或者在原创 2007-01-02 22:16:00 · 912 阅读 · 0 评论 -
C#中Split分隔字符串的应用
1、用字符串分隔: using System.Text.RegularExpressions; string str="aaajsbbbjsccc";string[] sArray=Regex.Split(str,"js",RegexOptions.IgnoreCase);foreach (string i in sArray) Response.Write(i.ToString() + "");转载 2007-01-07 10:23:00 · 773 阅读 · 0 评论 -
C#的数据类型
1、整数类型sbyte System.SByte 8位有符号整数 short System.Int16 16位有符号整数int System.Int32 32位有符号整数long System.Int64 64位有符号整数byte Sys原创 2007-01-02 22:18:00 · 1045 阅读 · 0 评论 -
Visual C#常用函数和方法集汇总
1、DateTime 数字型 System.DateTime currentTime=new System.DateTime(); 1.1 取当前年月日时分秒 currentTime=System.DateTime.Now; 1.2 取当前年 int 年=currentTime.Year; 1.3 取当前月 int 月=currentTime.Month; 1.4原创 2007-01-02 22:19:00 · 701 阅读 · 0 评论