© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
C#C
C#•4y ago•
10 replies
Elio

Using instruction

Hi, i would like to know when we are using the instruction "using like this :
using (var context = new BloggingContext())
{
    var blogs = context.Blogs.ToList();
}
using (var context = new BloggingContext())
{
    var blogs = context.Blogs.ToList();
}


does it automatically dispose all the variable inside "blogs" and "context" ?
C# banner
C#Join
We are a programming server aimed at coders discussing everything related to C# (CSharp) and .NET.
61,871Members
Resources
Recent Announcements

Similar Threads

Was this page helpful?

Similar Threads

Azure Open AI preserve history and load instruction files
C#CC# / help
2y ago
❔ Bullet World.Step causes 0xC000001D Illegal Instruction (C BulletSharp)
C#CC# / help
4y ago
Float (signed) number comparisons compiled to unsigned version of instruction
C#CC# / help
2y ago
✅ using
C#CC# / help
2y ago