コード例 #1
0
ファイル: Program.cs プロジェクト: visitter/CS5Book
        //Structures are System.ValueType. Their behavier is like System.Int32 local vars. They are popped off the stack after their visibility block ends.
        static void Main(string[] args)
        {
            Console.ForegroundColor = ConsoleColor.Green;
            //valueTypeCopying();
            //refTypeCopying();
            //copyValueTypesContainingRefType();
            
            Person p = new Person("Ivan", 34);
            p.Display();
            SendAPersonByValue(p);
            p.Display();
            SendAPersonByReference(ref p);
            p.Display();

            Console.ReadLine();
        }