string[] num = null; //定义数组并赋值空 if (num.Length == 0) //判断数组里是否存在数据 { //如果没有数据,重新赋值 num=new string[ 数组长度]; num[0]="123"; ......... }