Mega Code Archive

 
Categories / C# Book / 01 Language Basics
 

0202 Rethrow exception

We can throw exception in catch statement block and change the exception type. try { ... } catch (FormatException ex) { throw new XmlException ("Invalid DateTime", ex); }