c# - How to catch an Exception in an Event-method -


when made lostfocus-event textbox, notimplementedexception() added. how catch exception? code is:

void marks_lostfocus(object sender, eventargs e) {     throw new notimplementedexception(); } 

edited

i m sorry unclear question wanted ask when create event of lostfocus vs automatically adds line. academically speaking. can catch exception , use of it. why vs automatically adds line

wrap around try/catch?

void marks_lostfocus(object sender, eventargs e) {      try     {         throw new notimplementedexception();     }     catch(exception ex)     {         // handle ex     } } 

Comments