tag:blogger.com,1999:blog-724685353170639218.post1291826933624920116..comments2016-08-19T08:05:30.503+01:00Comments on richardod's blog: Speeding up SQL Server Inserts by using transactionsRichard ODhttp://www.blogger.com/profile/13855706515612188950noreply@blogger.comBlogger2125tag:blogger.com,1999:blog-724685353170639218.post-19745024344920869262009-03-16T20:47:00.000+00:002009-03-16T20:47:00.000+00:00Preet,I assume you meaning doing this:executeNonQu...Preet,<BR/><BR/>I assume you meaning doing this:<BR/><BR/>executeNonQueryDel();<BR/><BR/>Instead of: <BR/><BR/>executeNonQueryDel.Invoke();<BR/><BR/>I considered doing that. The reason why I called Invoke, is because I prefer the syntax (it makes it more obvious from a casual glance that I'm using a delegate). Had I not done it this way, the resultant CIL would still be the same.Richard ODhttps://www.blogger.com/profile/13855706515612188950noreply@blogger.comtag:blogger.com,1999:blog-724685353170639218.post-38350260998177010662009-03-15T23:17:00.000+00:002009-03-15T23:17:00.000+00:00Hey rich thanks for this. One question comes strai...Hey rich thanks for this. <BR/>One question comes straight to mind - why use Delegate.invoke?<BR/><BR/>Could you not just invoke the lambda directly?<BR/><BR/>e.g.<BR/><BR/>Action<T> caller;<BR/>.<BR/>.<BR/>caller = x => {};<BR/>.<BR/>.<BR/>.<BR/>T foo = default(T);<BR/>caller(foo);preet sanghahttps://www.blogger.com/profile/07027050079768738581noreply@blogger.com