Answer the question
In order to leave comments, you need to log in
Is the object being destroyed?
There is a piece of code like this
using(var contactContext=new ContactsContext())
{
var tel = contactContext.Telephones.Where(t => t.ContactId == idContact).Where(t => t.TelephoneId > idOldTelephone).ToArray();
return tel;
}
Answer the question
In order to leave comments, you need to log in
Yes.
Have you tried googling? The first link on request "using return".
stackoverflow.com/questions/3247617/what-happens-i...
And you could also look on msdn (or anywhere) that using is actually a try-finally.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question