CSharp_DeepCopy.Program.Main C# (CSharp) Method

Main() static private method

static private Main ( string args ) : void
args string
return void
        static void Main(string[] args)
        {
            A source = new A();
            source.field1 = 10;
            source.field2 = 20;

            A target = source;
            target.field2 = 30;

            Console.WriteLine("{0} {1}", source.field1, source.field2);
            Console.WriteLine("{0} {1}", target.field1, target.field2);

            Console.ReadKey();
        }
Program