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.