Click or drag to resize

TryCastExtension Methods

The TryCastExtension type exposes the following members.

Methods
 NameDescription
Public Extension MethodCode exampleTryCastTValue Creates the TryCastWorkerTValue object to get a fluent notation for try-casting types.

This pattern avoids heavily nested if (class is type) / else chains when testing for more than one possible cast.

Top
See Also