posts - 195,  comments - 30,  trackbacks - 0
class ForEachTest
{
    static void Main(string[] args)
    {
        int[] fibarray = new int[] { 0, 1, 2, 3, 5, 8, 13 };
        foreach (int i in fibarray)
        {
            System.Console.WriteLine(i);
        }
    }
}
--------------
string a = "a,b,c";
string[] arr = a.Split(',');//根据逗号分割成字符串数组,数组中的内容是a、b和c三个值。
string s = a.Replace(',', ';'); //这个是用分号去替换逗号,出来的结果为:a;b;c
posted on 2011-03-14 09:47 luis 阅读(514) 评论(0)  编辑 收藏 引用

只有注册用户登录后才能发表评论。
网站导航: 博客园   IT新闻   BlogJava   知识库   博问   管理


<2024年5月>
2829301234
567891011
12131415161718
19202122232425
2627282930311
2345678

常用链接

留言簿(3)

随笔分类

随笔档案

文章分类

文章档案

友情链接

搜索

  •  

最新评论

阅读排行榜

评论排行榜