You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
halcharger edited this page Apr 2, 2014
·
2 revisions
#####ExceptionExtensions.GetBaseException
Often when handling exceptions you are only interested in the original exception thrown in the stack. In a multi-level exception stack Exception.InnerException only returns the Exception one level down in the stack. you could use Exception.InnerException.InnerException... but this requires you knowing exactly how deep the Exception stack is. Now you can write the following: