//return InnerException
private Exception GetInnerException(Exception ex)
{
if (ex.InnerException != null)
{
return GetInnerException(ex.InnerException);
}
return ex;
}
//return InnerExceptionMessage
private string GetInnerException(Exception ex)
{
if (ex.InnerException != null)
{
return GetInnerException(ex.InnerException);
}
return ex.Message;
}