public interface IDisposable { void Dispose(); }
public class MyClass : IDisposable { public void Dispose() { // Perform any object clean up here. // If you are inheriting from another class that // also implements IDisposable, don't forget to // call base.Dispose() as well. } }
IDisposable
Dispose
using
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)