Beispiel #1
0
        static void Main()
        {
            var darkTrooper = new Stormtrooper("Dark trooper", 180, 80);
            Stormtrooper anotherDarkTrooper = darkTrooper.Clone() as Stormtrooper;
            darkTrooper.Height = 200;

            Console.WriteLine(darkTrooper);
            Console.WriteLine(anotherDarkTrooper);
        }
        private static void Main(string[] args)
        {
            var darkTrooper = new Stormtrooper("Dark trooper", 180, 80);
            var anotherDarkTrooper = darkTrooper.Clone();

            darkTrooper.Height = 200;

            Console.WriteLine(darkTrooper);
            Console.WriteLine(anotherDarkTrooper);
        }
Beispiel #3
0
        static void Main()
        {
            var          darkTrooper        = new Stormtrooper("Dark trooper", 180, 80);
            Stormtrooper anotherDarkTrooper = darkTrooper;

            darkTrooper.Height = 200;

            Console.WriteLine(darkTrooper);
            Console.WriteLine(anotherDarkTrooper);
        }
        private static void Main(string[] args)
        {
            var darkTrooper        = new Stormtrooper("Dark trooper", 180, 80);
            var anotherDarkTrooper = darkTrooper.Clone() as Stormtrooper;

            darkTrooper.Height = 200;

            Console.WriteLine(darkTrooper);
            Console.WriteLine(anotherDarkTrooper);
        }
Beispiel #5
0
        public static void Main()
        {
            var darkTrooper = new Stormtrooper("Dark trooper", 180, 80);

            Console.WriteLine(darkTrooper);

            // var anotherDarkTrooper = new Stormtrooper("Dark trooper", 180, 80);
            var anotherDarkTrooper = darkTrooper.Clone();

            Console.WriteLine(anotherDarkTrooper);
        }
        public object Clone()
        {
            var clone = new Stormtrooper(this.Type, this.Height, this.Weight);

            return clone;
        }
Beispiel #7
0
        public object Clone()
        {
            var clone = new Stormtrooper(this.Type, this.Height, this.Weight);

            return(clone);
        }