Share via


ExternalResponse.TryGetDataAs Method

Definition

Overloads

Name Description
TryGetDataAs(Type, Object)

Attempts to retrieve the underlying data as the specified type.

TryGetDataAs<TValue>(TValue)

Determines whether the underlying data can be retrieved as the specified type.

TryGetDataAs(Type, Object)

Attempts to retrieve the underlying data as the specified type.

public bool TryGetDataAs(Type targetType, out object? value);
member this.TryGetDataAs : Type * obj -> bool
Public Function TryGetDataAs (targetType As Type, ByRef value As Object) As Boolean

Parameters

targetType
Type

The type to which the data should be cast or converted.

value
Object

When this method returns true, contains the value of type targetType if the data is available and compatible.

Returns

true if the data is present and can be cast to targetType; otherwise, false.

Applies to

TryGetDataAs<TValue>(TValue)

Determines whether the underlying data can be retrieved as the specified type.

public bool TryGetDataAs<TValue>(out TValue? value);
member this.TryGetDataAs : 'Value -> bool
Public Function TryGetDataAs(Of TValue) (ByRef value As TValue) As Boolean

Type Parameters

TValue

The type to which the underlying data is to be cast if available.

Parameters

value
TValue

When this method returns, contains the value of type TValue if the data is available and compatible.

Returns

true if the data is present and can be cast to TValue; otherwise, false.

Applies to