国产一级a片免费看高清,亚洲熟女中文字幕在线视频,黄三级高清在线播放,免费黄色视频在线看

打開(kāi)APP
userphoto
未登錄

開(kāi)通VIP,暢享免費(fèi)電子書(shū)等14項(xiàng)超值服

開(kāi)通VIP
字符串處理
str.padleft(n,'*')重復(fù)輸出
 string str = "中國(guó)加油!";
 str.Dayofweek()為星期幾
str.tostring('yyyy年mm月dd日')
            Response.Write(str.IndexOf("中國(guó)").ToString());//取相同字符的索引
            Response.Write(str.Insert(2,"河南"));//插入
            Response.Write(str.Remove(0,2));//移除
            Response.Write(str.Replace("中國(guó)", "河南"));//替換
            Response.Write(str.Substring(0,2));//可以用來(lái)截取身份證號(hào)獲取生日
            Response.Write(str.Trim());//去除兩端空格

日期處理:
            DateTime Mydate = new DateTime(2010,4,24);
            DateTime Date1 = Mydate.AddHours(-36.3669);
            DateTime Date2 = Date1.AddMonths(23);
            Response.Write(Date1.ToString()+"<Br/>"+Date2.ToString());
DateTime time1 = new DateTime(2010,4,24,16,48,46);
Response.Write(time1.ToString("d"));//為短日期形式只顯示日期不顯示時(shí)間
Response.Write(time1.ToString("dddd HH:mm:ss"));//輸出星期,時(shí)間
Response.Write(time1.ToString("yy年MM月dd日"));//輸出日期
數(shù)據(jù)類(lèi)型處理:
             byte a = 15;//單字節(jié)變量
            short b = a;//微精度變量
            int c = b;//整型
            long d = c;//長(zhǎng)整型
            float e = d;//浮點(diǎn)數(shù)
            double q = e;//雙精度

把字符串轉(zhuǎn)換為數(shù)組:
            string Mydata = "hello world";
            char[] data = Mydata.ToCharArray();
            Response.Write(data[0]);
           string Mydata = "hello\\world";
             string [] data = Mydata.Split('\\');//用截取字符串的方式
            Response.Write(data[0].ToString());

 
本站僅提供存儲(chǔ)服務(wù),所有內(nèi)容均由用戶發(fā)布,如發(fā)現(xiàn)有害或侵權(quán)內(nèi)容,請(qǐng)點(diǎn)擊舉報(bào)。
打開(kāi)APP,閱讀全文并永久保存 查看更多類(lèi)似文章
猜你喜歡
類(lèi)似文章
C#中Split分隔字符串的應(yīng)用(C#、split、分隔、字符串)
C#優(yōu)化字符串操作
asp.net(c#)常用函數(shù)表
生活服務(wù)
分享 收藏 導(dǎo)長(zhǎng)圖 關(guān)注 下載文章
綁定賬號(hào)成功
后續(xù)可登錄賬號(hào)暢享VIP特權(quán)!
如果VIP功能使用有故障,
可點(diǎn)擊這里聯(lián)系客服!

聯(lián)系客服