示例#1
0
        static public void Run()
        {
            SimpleStructure simpleStructure;

            simpleStructure.x = 1;
            simpleStructure.y = 2;
            simpleStructure.z = 3;
            SimpleStructure outputSimpleStructure = new SimpleStructure();

            int resultInt = CalculateStructure(simpleStructure, ref outputSimpleStructure);

            PerfManager.Assert(resultInt == (simpleStructure.x + simpleStructure.y * 3 + simpleStructure.z * 5), "Invalid CalculateStructure ByValue");
            PerfManager.Assert((outputSimpleStructure.x == simpleStructure.x &&
                                outputSimpleStructure.y == simpleStructure.y &&
                                outputSimpleStructure.z == simpleStructure.z), "Invalid CalculateStructure ByRef");
        }
示例#2
0
 static public int CalculateStructure(SimpleStructure structOnStack, ref SimpleStructure structByRef)
 {
     return(0);
 }