C# program with exceptions