One thing that has bugged me with exception handling coming from Python to C# is that in C# there doesn\'t appear to be any way of specifying an else clause. For example, in
You could write it like:
bool success = false; try { reader = new StreamReader(path); success = true; } catch(Exception) { // Uh oh something went wrong with opening the file for reading } finally { if(success) { string line = reader.ReadLine(); char character = line[30]; } }