ExternalResponse.DataAs Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Overloads
| Name | Description |
|---|---|
| DataAs(Type) |
Attempts to retrieve the underlying data as the specified type. |
| DataAs<TValue>() |
Attempts to retrieve the underlying data as the specified type. |
DataAs(Type)
Attempts to retrieve the underlying data as the specified type.
public object? DataAs(Type targetType);
member this.DataAs : Type -> obj
Public Function DataAs (targetType As Type) As Object
Parameters
- targetType
- Type
The type to which the data should be cast or converted.
Returns
The data cast to the specified type, or null if the data cannot be cast to the specified type.
Applies to
DataAs<TValue>()
Attempts to retrieve the underlying data as the specified type.
public TValue? DataAs<TValue>();
member this.DataAs : unit -> 'Value
Public Function DataAs(Of TValue) () As TValue
Type Parameters
- TValue
The type to which the data should be cast or converted.
Returns
The data cast to the specified type, or null if the data cannot be cast to the specified type.