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

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