Chapter Four Slide C# STD
Chapter Four Slide C# STD
Chapter Four
Exception Handling in .NET Framework,
C#
{ }
TextReader reader = new StreamReader(fileName); catch (IOException ioe)
string line = reader.ReadLine(); {
//Exception handler for other input/output exceptions
Console.WriteLine(line);
// We just print the stack trace on the console
reader.Close(); Console.WriteLine(ioe.StackTrace);
} }
}