IF simplificado com LINQ

CSharp · Console

/Program.cs

using System;
using System.Linq;
using System.Net;
using System.Collections.Generic;
					
public class Program
{

	
	public static void Main()
	{
		List<Exception> le = new List<Exception>();
		
		try
		{
			try{
				throw new Exception(" except 1");
			}
			catch(Exception e)
			{
				le.Add(e);
				throw new Exception("except 2");
			}
		}
		catch(Exception e)			
		{
			le.Add(e);
		}
		
		foreach(var e in le)
		{
			Console.WriteLine(e);
		}
	}
	
	
}
;