using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace ConsoleApplication1
{
class testArray
{
static void Main(string[] ager)
{
string[] Strs = {"A","B","1","2"};
int[] ints = {2,3,6};
//循环遍历字符串组
for (int i = 0; i < Strs.Length; i++)
{
Console.WriteLine(Strs[i]);
}
foreach (string str in Strs)
{
Console.WriteLine(str);
}
//数组
foreach (int i in ints)
{
Console.WriteLine(i.ToString());
}
Console.ReadLine();
}
}
}
|