关于数组这块的,没弄懂
string[] job = new string[4] job[0] ="经理"; job[1]= "项目主管"; job[2]= "技术总监"; job[3]= "财务主管" for (int i = 0; i <job.length; i++) 这点还是没弄懂,如果这样写可以吗
string[] job = new string[4] job[0] ="经理"; job[1]= "项目主管"; job[2]= "技术总监"; job[3]= "财务主管" for (int i = 0; i <job.length; i++) 这点还是没弄懂,如果这样写可以吗
2015-10-25
using System;
using System.Collections.Generic;
using System.Text;
namespace Test
{
class Program
{
static void Main(string[] args)
{
//声明“职位”数组,初始化为:"经理","项目主管","技术总监","财务主管"
string[] job = new string[] { "经理","项目主管","技术总监","财务主管"};
for (int i = 0; i <4 ; i++)
{
Console.WriteLine(job[i]);//打印职位
}
}
}
}
举报