Version

GetOptions<T> Method (SaveDocumentContext)

Gets the Options cast as the specified type or throws an System.ArgumentException if they are of a different type.
Syntax
'Declaration
 
Public Function GetOptions(Of T As SaveOptionsBase)( _
   ByVal defaultOptions As T _
) As T
public T GetOptions<T>( 
   T defaultOptions
)
where T: SaveOptionsBase

Parameters

defaultOptions
The default options instance to use if Options is null.

Type Parameters

T
The type to which the options should be cast.

Return Value

The Options cast as the specified type or defaultOptions if Options is null.
Exceptions
ExceptionDescription
System.ArgumentExceptionOccurs when Options is non-null but not an instance of T.
Requirements

Target Platforms: Windows 10, Windows 8.1, Windows 8, Windows 7, Windows Server 2012, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

See Also