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