public int NextNumber() { lock (this) { if (++_value > MaxValue) _value = StartValue; return _value; } }