andrew4582

Combine Aggregate Exception

Apr 10th, 2013
186
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.30 KB | None | 0 0
  1.         string CombineAggregateException(AggregateException exception)
  2.         {
  3.             string message = exception.Message;
  4.             for (int i = 0; i < exception.InnerExceptions.Count; i++)
  5.                 message += Environment.NewLine + string.Format("{0:N0}: {1}", i + 1, exception.InnerExceptions[i].Message);
  6.             return message;
  7.         }
Advertisement
Add Comment
Please, Sign In to add comment