On 9 May 2012 20:00, Stephen Russell <[email protected]> wrote:
>  // fill customer data object from ID
> using (RingEDIEntities db = new RingEDIEntities())    << Entity Framework here
> {
> ...
> }

It's interesting how the using statment works. The c# compiler actualy
translates this into a try...catch.

RingEDIEntities db;
try
{
   db = new RingEDIEntities();
}
catch
{
}
finally
{
   db.Dispose()
}

lock() works in a similar way.  This translates also to a try..catch

lock(myObject)
{
   // Thread sensitive code
}

For me, I've been writing c/c++ code for 20 years, so I love c# syntax :-)

-- 
Paul

_______________________________________________
Post Messages to: [email protected]
Subscription Maintenance: http://leafe.com/mailman/listinfo/profox
OT-free version of this list: http://leafe.com/mailman/listinfo/profoxtech
Searchable Archive: http://leafe.com/archives/search/profox
This message: 
http://leafe.com/archives/byMID/profox/cadwx0++x0nnddguqdhm6poau4awtk__mj9yh7sirjt79sdu...@mail.gmail.com
** All postings, unless explicitly stated otherwise, are the opinions of the 
author, and do not constitute legal or medical advice. This statement is added 
to the messages for those lawyers who are too stupid to see the obvious.

Reply via email to