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 閱讀(531)
評論(0) 編輯 收藏 引用