Exception Filters

Lets you specify a condition on a catch block.

try 
{
   throw new Exception("error");
}
catch (Exception ex) if (ex.Message = "text")
{
}
catch (Exception ex) if (ex.Message = "error")
{
   // this executes
}


© 2024 Better Solutions Limited. All Rights Reserved. © 2024 Better Solutions Limited TopPrevNext