Beispiel #1
0
        static void Main(string[] args)
        {
            DerivedType dt = new DerivedType();
            DerivedType d2 = dt.Clone() as DerivedType; //clone return the base type
            var         d3 = dt.Clone();                //clone return the base type

            Console.WriteLine(d2);
            Console.WriteLine(d3);
            if (d2 is null)
            {
                Console.WriteLine("d2 is null");
            }

            Console.ReadKey();
        }
Beispiel #2
0
        public object Clone()
        {
            DerivedType dt = new DerivedType(this);

            return(dt);
        }
Beispiel #3
0
 private DerivedType(DerivedType right) : base(right)
 {
     _Value = right._Value.Clone() as double[];
 }