try {
FileInfo source =
new FileInfo(filename);
int length = (int)source.Length;
char[] contents = new char[length];
...
}
catch (SecurityException
caught) {
...
}
catch (IOException
caught) {
...
}
catch (OutOfMemoryException)
{
...
}
catch {
...
throw;
}