protected void ThrowIfReadOnly() { if (_readOnly) { throw new NotSupportedException("This is a readonly instance and set is not supported"); } }