public class A
    {
        public long? a= null;        public long? b= null;        public A(A c)
            
        {
            this.a = c.a;
            this.b= c.b;
        }

解决方案 »

  1.   

    public A(long i,long j)
            {
                a = i;
                b = j;
            }
    加个构造函数吧
    A a = new A(3,4);
      

  2.   

    c#不持拷贝构造函数,如果需要这样的功能,可以实现ICloneable接口
    class A:ICloneable
            {
                A() { }            public object  Clone()
                {
                    return this.MemberwiseClone();//注,此方法只用于减复制,如果深复制需要自已实现
                }
               
            }使用时
    A c=new A();
    A a=(A)c.Clone();