Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public static bool TryExecute(Action action)
- {
- try
- {
- action();
- return true;
- }
- catch (Exception ex)
- {
- LogException(ex);
- return false;
- }
- }
- public void Usage()
- {
- return TryExecute(() => FooBar());
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement