예제 #1
0
 private void IncrementByRef(ref FourBytesStruct toIncrement)
 {
     unchecked
     {
         toIncrement.i1++;
     }
 }
예제 #2
0
 private FourBytesStruct IncrementByVal(FourBytesStruct toIncrement)
 {
     unchecked
     {
         toIncrement.i1++;
     }
     return(toIncrement);
 }
예제 #3
0
        public void BenchmarkIncrementByVal(int limit)
        {
            FourBytesStruct value   = new FourBytesStruct();
            int             counter = 0;

            do
            {
                value = IncrementByVal(value);
                counter++;
            }while (limit != counter);
        }