All articles| All Pictures| All Softwares| All Video| Go home page| Write articles| Upload pictures

Reading number is top 10 articles
PHP开发网站来看:PHP网站开发方案_php资料_编程技术
应该学会:ASP.NET的,Session,详解_.net资料_编程技术
用动态网页技术PHP生成验证码图片的源代码_[PHP教程]
ASP.NET,生成HTML静态页面实例_[Asp.Net教程]
ASP.NET2.0邮件群发_[Asp.Net教程]
十五 Javascript_[Html教程]
AJAX.NET框架构建Lookup服务器控件_[Asp.Net教程]
c#中的错误处理
动态网页技术PHP入门基础:开始编程_php资料_编程技术
PHP爱好者来看:初学者头痛问题汇总_php资料_编程技术
Reading number is top 10 pictures
The little woman's bright wire2
Summer is most suitable for young people to travel in China9
恶搞漫画1
The little woman's bright wire1
Fan bingbing black wings for platform and DanLuoWang believes beauty2
Born After 90 Beijing sports university campus flower photos2
China's first snake village1
Household design of gorgeous series
Female model behind the bitterness, often being overcharged3
这酸爽,让人不敢相信
Download software ranking
Dance with duck(male prostitution)
传奇私服架设教程
jdk1.6 for windows
Red cliff
变速齿轮3.26
株洲本地在线棋牌游戏
SP4 for SQL2000
Detective task-the top secret prostitution files
Tram sex maniac 2 (H) rar bag15
Popkart Cracked versions Mobile phone games
归海一刀 published in(发表于) 2014/1/30 1:17:31 Edit(编辑)
asp.net(c#)如何把字符串转换成数组_[Asp.Net教程]

asp.net(c#)如何把字符串转换成数组_[Asp.Net教程]

asp.net(c#)如何把字符串转换成数组_[Asp.Net教程]
数据库中记录保存格式是"a,b,c,d",现准备分别取出各值,如果直接取出做数组是不行的,必须进行转换,本文分2种情况,一种是该字符串转换成字符string[]类数组,一种是字符串转换成int[]类数组。


string a = "a,b,c,d";
string b = "1,2,3,4";

string[] arr1 = a.Split(','); //将字符串转换成数组arr1

string[] arrtemp = b.Split(',');
int[] arr2 = new int[arrtemp.Length]; //用来存放将字符串转换成int[]
for(int i = 0; i < arrtemp.Length; i++)
{
arr2[i] = int.Parse(arrtemp[i]);
}


添加到del.icio.us 添加到新浪ViVi 添加到百度搜藏 添加到POCO网摘 添加到天天网摘365Key 添加到和讯网摘 添加到天极网摘 添加到黑米书签 添加到QQ书签 添加到雅虎收藏 添加到奇客发现 diigo it 添加到饭否 添加到飞豆订阅 添加到抓虾收藏 添加到鲜果订阅 digg it 貼到funP 添加到有道阅读 Live Favorites 添加到Newsvine 打印本页 用Email发送本页 在Facebook上分享


Disclaimer Privacy Policy About us Site Map

If you have any requirements, please contact webmaster。(如果有什么要求,请联系站长)
Copyright ©2011-
uuhomepage.com, Inc. All rights reserved.