Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Opinions On Using Using
Message
General information
Forum:
ASP.NET
Category:
Coding, syntax and commands
Title:
Opinions On Using Using
Miscellaneous
Thread ID:
01471931
Message ID:
01471931
Views:
106
I read somewhere that when you create a class you should implemente IDisposable so that you can wrap instances of your class in a using statement:
class Customer : IDisposable
{
    public void Dispose()
    {
            
    }
}
and
List<Customer> Customers = new List<Customer>();

foreach (Customer customer in Customers)
{
    using (customer)
    {
        // Do something
    }
}
I would like to know what you guys think on this. Thanks
Everything makes sense in someone's mind
public class SystemCrasher :ICrashable
In addition, an integer field is not for irrational people
Next
Reply
Map
View

Click here to load this message in the networking platform