class A
    {
        private int i;
        //构造函数A
        public A()
        {
            this.i = 0;
        }
        //重载构造函数A
        public A(int temp)
        {
            this.i = temp;
        }
        public A(string  c)
        {
            A (int.Parse(c));//这里出错了...        }
        //输出变量i
        public void printi()
        {
            Console.WriteLine(this.i);
        }
    }

解决方案 »

  1.   

    public A(string c):this( int.Parse(c) )
    {}
      

  2.   

    public A(string  c)
    {
        A (int.Parse(c));//这里出错了...
    }=>public A(string  c) : this(int.Parse(c))
    {
    }
      

  3.   

    public A(string  c)
            {
                //A (int.Parse(c));//这里出错了...
                this.i = int.Parse(c);//加到这里看着比较舒服        }
      

  4.   

    public A(string  c)
            {
                A (int.Parse(c));//这里出错了...        }这个应该这样改:
          public A(string  c)
            {
    int t;
                try{
    t=Convert.ToInt32(c)
                 
                   }
    catch(Exception ex)
    {
     throw ex;
    }
            }
      

  5.   

    构造函数调用构造函数用: this语法。
      

  6.   

    class A
        {
            private int i;
            //构造函数A
            public A()
            {
                this.i = 0;
            }
            //重载构造函数A
            public A(int temp)
            {
                this.i = temp;
            }
            public A(string  c, int a)//多带几个参数呢?怎么处理?
            {
                        }
            //输出变量i
            public void printi()
            {
                Console.WriteLine(this.i);
            }
        }
      

  7.   

    to public A(string c, int a)//多带几个参数呢?怎么处理?你要调用其他构造函数,因此你的参数类型以及个数要满足其它构造函数所定义的参数约定。