by Chad
2. April 2012 07:48
For my friends in the Springfield .NET Users group. You can use this C# code snippet to quickly implement the Dispose pattern in your classes. Enjoy!
How to install the snippet
Drop this .snippet file in your C:\Users\<UserName>\Documents\Visual Studio 2010\Code Snippets\Visual C#\My Code Snippets folder.
How to use this snippet
- Add the IDisposable interface to your class
- With the cursor inside your class declaration type: dispimp + tab + tab
Download the Snippet
dispimp.snippet (1.50 kb)
Resources
http://msdn.microsoft.com/en-us/library/system.idisposable.aspx
2b6c2560-2dd8-437c-8a81-45d24a167e61|1|3.0
Tags:
.NET-Basics