|
|
submitted by
Nextender
8 months, 27 days ago
nextension.blogspot.com — On regular basis several repeating code blocks appear in projects source code. Wouldn't it be great if we could just say: here is my method, do call within TCF block ("try - catch - finally" block) first time I need it, but I may require to call it with "try - catch" block only next time or with other catch block content (say I had logging there, but decided to remove or replace it for some special cases of this method call):
// Like this
return MyMethod1.TCF(ex => Log(ex), arg => DoSomeFinallyAction(arg))(arg); read more...
add a comment
|
category: C# | Views: 2
|
|
tags:
Expressions, Lambda, C# | tag it
Everyones tags: | Your tags: | |
|
|
|