public void Lock() { if (IsLocked) throw new InvalidOperationException("The texture must be unlocked in order to be locked."); Texture.Lock(); }