using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.IO;
namespace exceptii
{
class Program
{
static void Main(string[] args)
{
try
{
StreamReader fin = new StreamReader("date.in");
}
catch (Exception e)
{
Console.WriteLine("Fisierul nu a fost gasit");
}
try
{
int a = 3;
int b = 3;
int n = 3 / (a - b);
}
catch (Exception e)
{
Console.WriteLine("Impartire la 0!");
}
int x;
try
{
x = int.Parse(Console.ReadLine());
}
catch (Exception e)
{
Console.WriteLine("Format invalid");
}
finally
{
x = 0;
}
Console.ReadKey();
}
}
}
|