猿问

该怎样才能运行呢?

namespace Test
{
    class Program
    {   string name{"a","b","c","d","e"}
        const int Max=5;
        private string []name=new string[Max];
        public string this[int index]
        {
            get{
                if(index>=0&&index<Max)
                return name[index];
                else
                return name[0];
            }
            set
            {
                if(index>=0&&index<Max)
                name[index]=vaule;
            }}}
    class GG{
            static void Main(string[] args)
        {
            Program a=new Program();
            Console.WriteLine("a[1]");
        }
}

qq_AWAQAERA_0
浏览 889回答 1
1回答

小草1434

再写一个main 方法 或者测试类 祝学习愉快!
随时随地看视频慕课网APP
我要回答