Skip Navigation LinksHome : Submit Snippet : Snippet Search : Snippet Detail
Snippet language icon

Author:
Konstantin Savelev

Submitted:
26 Sep 2005

Language:
C#



Snippet Detail and Download

Snippet Type(s):  Expansion
Abstract (from author):
Code snippet for IDisposable pattern declaration


Description (from snippet):
Code snippet for IDisposable pattern declaration


Code Block:
1 private bool disposed = false; 2 3 public void Dispose() 4 { 5 Dispose(true); 6 } 7 8 private void Dispose(bool disposing) 9 { 10 if(!this.disposed) 11 { 12 if(disposing) 13 { 14 $end$ 15 } 16 } 17 disposed = true; 18 } 19 20 ~$classname$() 21 { 22 Dispose(false); 23 }
Download Now!
Download the snippet file by clicking the download button below. You may customize the snippet shortcut prior to downloading below.

Shortcut:

The download is in Visual Studio Community Content Installer (VSI) format.