static void Main(string[] args) { using (DisposeExample test = new DisposeExample()) { test.DoSomething(); } }
static void Main(string[] args) { DisposeExample test = new DisposeExample(); test.Dispose(); DisposeExample test1 = new DisposeExample(); }