Tom's Toolbox
Tom's Toolbox
TomsToolbox.Desktop
TryCastWorkerBase(TValue, TResult) Class
TryCastWorkerBase(TValue, TResult) Methods
ElseThrow Method
ElseThrow Method
ElseThrow Method (String)
TryCastWorkerBase
TValue
,
TResult
ElseThrow Method
Throws an
InvalidOperationException
if none of the casts have succeeded.
Namespace:
TomsToolbox.Desktop
Assembly:
TomsToolbox.Desktop (in TomsToolbox.Desktop.dll)
Syntax
C#
VB
Copy
public
TResult
ElseThrow
()
Public
Function
ElseThrow
As
TResult
Return Value
Type:
TResult
This method never returns, but throws the exception.
Exceptions
Exception
Condition
InvalidOperationException
Encountered an unexpected type: 'type name'
See Also
Reference
TryCastWorkerBase
TValue, TResult
Class
ElseThrow Overload
TomsToolbox.Desktop Namespace
© tom-englert.de 2012-2023