Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- int Foo(int param1, bool param2, string param3)
- {
- try
- {
- logger.Log(string.Format("Calling {0}({1}, {2}, {3})", "Foo", param1, param2, param3);
- ..
- var returnValue = ..;
- ..
- logger.Log(string.Format("Result for call {0}({1}, {2}, {3}) => {4}", "Foo", param1, param2, param3, returnValue);
- return returnValue;
- }
- catch(Exception ex)
- {
- logger.Log(string.Format("Exception while calling {0}({1}, {2}, {3}) => {4}", "Foo", param1, param2, param3, ex);
- throw;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement