Top "Using" questions

"using" is a keyword in some programming languages (C++, C#, VB.

"using" function

I've defined 'using' function as following: def using[A, B <: {def close(): Unit}] (closeable: B) (f: B => A): …

scala using tuples
In LINQ-SQL, wrap the DataContext is an using statement - pros cons

Can someone pitch in their opinion about pros/cons between wrapping the DataContext in an using statement or not in …

linq linq-to-sql datacontext using
How to return a Stream from a method, knowing it should be disposed?

I have a method that takes FileStream as input. This method is running inside a for loop. private void UploadFile(…

c# stream using idisposable
Questions about Entity Framework Context Lifetime

I have some questions about the desired lifetime of an Entity Framework context in an ASP.NET MVC application. Isn't …

c# asp.net-mvc entity-framework using idisposable
Entity Framework, DBContext and using() + async?

There is a thing that's been bugging me for a long time about Entity Framework. Last year I wrote a …

c# .net entity-framework asynchronous using
Not able to get Costura.Fody to work, keeps asking for the DLL

I have installed costura.fody into my project using nuget package. I have updated the FodyWeavers.xml file with: <…

c# winforms using fody-costura
If an Exception happens within a using statement does the object still get disposed?

If an Exception happens within a using statement does the object still get disposed? The reason why I'm asking is …

c# exception-handling try-catch using
Does "using" statement always dispose the object?

Does the using statement always dispose the object, even if there is a return or an exception is thrown inside …

c# dispose using using-statement
Java equivalent of C# 'using' statement

Possible Duplicate: “using” keyword in java I'm transitioning from C# to java, so please bear with me... When reading a …

c# java file exception using