Friday, May 8, 2015

When catching an exception in C#, if you're not going to do anything with the exception itself, you don't have to name it.

You might do something with...

catch (Exception exception)
{

 
 

...but if you're going to do nothing with it itself specifically you may just open the catch block like so:

catch (Exception)
{

No comments:

Post a Comment