Is there a better way for handling exceptions ? Can I do the same thing but only with one try catch ?
Do I need to create my own exceptions class ?
try { firstname = bd["firstname"].ToString(); } catch (KeyNotFoundException fe) { firstname = null; } try { lastname = bd["lastname"].ToString(); } catch (KeyNotFoundException fe) { lastname = null; } try { phone = bd["phone"].ToString(); } catch (KeyNotFoundException fe) { phone = null; } ... ...