System.Exception.Exception.GetBaseException C# (CSharp) Method

GetBaseException() public method

public GetBaseException ( ) : Exception
return Exception
		public virtual Exception GetBaseException ()
		{
			Exception inner = inner_exception;
				
			while (inner != null)
			{
				if (inner.InnerException != null)
					inner = inner.InnerException;
				else
					return inner;
			}

			return this;
		}