自己写的一段代码,
编译,出现:1、使用了未赋值的局部变量“array1、array2,array3";2、使用了未赋值的局部变量“s1、s2、s3”
代码如下:
class Program
    {
        static void Main(string[] args)
        {
            int s1,s2,s3,s4 = 0;
            int[] array1,array2,array3,array4=new int[80];
            for (int m = 0; m < 81; m++)
            {
               
                Utility uty = new Utility();
                int n1,n2,n3,n4 = 0;
                n1 = m % 3;
                uty.CreateList(array1,m,n1,ref s1);
                n2 = (m / 3) % 3;
                uty.CreateList(array2,m,n2,ref s2);
                n3 = ((m / 3) / 3) % 3;
                uty.CreateList(array3,m,n3,ref s3);
                n4 = (((m / 3) / 3) / 3) % 3;
                uty.CreateList(array4,m,n4,ref s4);
            }
        }
    }
    public class Utility
    {
        public  Utility()
        {
        }        public void CreateList(int[] array,int m,int n,ref int s) //suffix下标
        {
            if ( n> 0)
            {
                int i = 0;
                while (i < n)
                {
                    array[s++] = m;
                }
            }
        }
    }
请高手指点……