private void Dispose(bool disposing) { if (!this.canChange && disposing) { throw new ArgumentException("This Pen cannot be disposed of."); } if (this.native != IntPtr.Zero) { LibIGraph.DisposePen(this.native); this.native = IntPtr.Zero; } }