private void IncrementByRef(ref TwoBytesStruct toIncrement) { unchecked { toIncrement.i1++; } }
private TwoBytesStruct IncrementByVal(TwoBytesStruct toIncrement) { unchecked { toIncrement.i1++; } return(toIncrement); }
public void BenchmarkIncrementByVal(int limit) { TwoBytesStruct value = new TwoBytesStruct(); int counter = 0; do { value = IncrementByVal(value); counter++; }while (limit != counter); }