Program
Program
using System.Collections.Generic;
namespace _12_04_PREPARATION_11V_11E
{
public class Program
{
public static void PrintNumbers(List<int> repo)
{
if(repo.Count < 0)
{
throw new Exception("Empty repo");
}
}
public static void Main(string[] args)
{
List<int> list = new List<int>();
try
{
Program.PrintNumbers(list);
}
catch(Exception ex)
{
Console.WriteLine(ex.Message);
}
try
{
int number = int.Parse("Invalid value");
}
catch(FormatException ex)
{
Console.WriteLine(ex.Message);
}
}
catch (Exception ex)
{
Console.WriteLine(ex.Message);
}
finally
{
Console.WriteLine("Process ended with flag {0}", flag);
}
}
}
}