Wenn man in C# zum Beispiel herausfinden will, ob der Exception-Typ der InnerExceptioneiner gefangenen Exception ein bestimmter Typ ist, so kann man das folgendermaßen abfragen:
catch (DbUpdateException ex) { if (ex.InnerException is UpdateException) { // error handling } }