/// <summary> /// Helper function used by subclasses to validate that the type /// of the storage medium passed to them matches their type /// </summary> /// <param name="type">type of STGMEDIUM</param> protected void ValidateType(TYMED type) { if (m_stg.tymed != type) { const string msg = "Invalid TYMED passed to OleStgMedium"; Debug.Assert(false, msg); throw new InvalidOperationException(msg); } }