DCSIMG
continuewith,using - Bnaya Eshet

Bnaya Eshet

Disclaimer

Browse by Tags

All Tags » continuewith » using (RSS)
Using async / await
Using async / await this post will discuss parallel disposal. whenever we want to dispose a parallel execution upon completion we can't use the convenient using keyword. for example, the following code may be dispose the command before completion: Very bad Code Snippet using ( var conn = new SqlConnection (CONN_STR)) using ( var cmd = new SqlCommand ( "Select * from Employee" , conn)) { conn.Open(); cmd.BeginExecuteReader(ar => { int affected = cmd.EndExecuteNonQuery(ar); }); } the...