Exception InvalidOperation (string msg) { #if NET_2_0 state = WriteState.Error; #endif return new InvalidOperationException (msg); }