Share via


ExternalRequest.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 is of the specified type and outputs the value if it is.

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 is of the specified type and outputs the value if it is.

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 compare with the underlying data.

Parameters

value
TValue

Returns

true if the underlying data is of type TValue; otherwise, false.

Applies to