using System.Collections.Generic;
public static void Main()
List<Exception> excepcoes = new List<Exception>();
excepcoes.Add(new ArgumentException("argumento", "argumento invalido"));
excepcoes.Add(new ArgumentNullException("argumento nulo"));
excepcoes.Add(new InvalidCastException("operacao invalida"));
throw new AggregateException(excepcoes);
catch(AggregateException aEx)
foreach(var ex in aEx.InnerExceptions)
Console.WriteLine("{0}: {1}\n", ex.GetType(), ex.Message);