c# - Is the finally block pointless? -
this question has answer here: why use in c#? 13 answers i'm teaching myself c# , studying try, catch , finally. book i'm using discussing how block runs regardless of whether or not try block successful. but, wouldn't code written outside of catch block run anyway if wasn't in finally? if so, what's point of finally? example program book providing: class myappclass { public static void main() { int[] myarray = new int[5]; try { (int ctr = 0; ctr <10; ctr++) { myarray[ctr] = ctr; } } catch { console.writeline("exception caught"); } { console.writeline("done exception handling"); } console.writeline("end of program"); console.readline()...