Ejemplo n.º 1
0
        static int Main()
        {
            TheStruct testStruct = new TheStruct();

            testStruct.fieldinStruct = "change_xyz";

            StructTaker_Inline(testStruct);

            System.Console.WriteLine("Struct field = {0}", testStruct.fieldinStruct);

            return(100);
        }
Ejemplo n.º 2
0
        private static int Main()
        {
            TheStruct testStruct = new TheStruct();

            testStruct.fieldinStruct = "change_xyz";

            StructTaker_Inline(testStruct);

            System.Console.WriteLine("Struct field = {0}", testStruct.fieldinStruct);

            return 100;
        }
Ejemplo n.º 3
0
        static void Main(string[] args)
        {
            TheClass testClass = new TheClass();
            TheStruct testStruct = new TheStruct();

            testClass.willChange = "Not changed";
            testStruct.willChange = "Not Changed";

            ClassTaker(testClass);
            StructTaker(testStruct);

            Console.WriteLine("Class field = {0}", testClass.willChange);
            Console.WriteLine("Struct field = {0}", testStruct.willChange);

            // Keep the console window open in debug mode.
            Console.WriteLine("Press any key to exit.");
            Console.ReadKey();
        }
Ejemplo n.º 4
0
 static void StructTaker_Inline(TheStruct s)
 {
     s.fieldinStruct = "xyz";
 }
Ejemplo n.º 5
0
 static void StructTaker_Inline(TheStruct s)
 {
     s.fieldinStruct = "xyz";
 }
Ejemplo n.º 6
0
 static void StructTaker(TheStruct s)
 {
     s.willChange = "Changed";
 }