UriExtensions.TryReadQueryAs Method
Namespace: System.Net.Http
Assembly: System.Net.Http.Formatting (in System.Net.Http.Formatting.dll)
Overload List
Name | Description | |
---|---|---|
TryReadQueryAs(Uri, Type, Object) | Reads HTML form URL encoded data provided in the URI query string as an object of a specified type. |
|
TryReadQueryAs<T>(Uri, T) | Reads HTML form URL encoded data provided in the URI query string as an object of a specified type. |
See Also
UriExtensions Class
System.Net.Http Namespace
Return to top
UriExtensions.TryReadQueryAs Method (Uri, Type, Object)
Reads HTML form URL encoded data provided in the URI query string as an object of a specified type.
Syntax
public static bool TryReadQueryAs(
this Uri address,
Type type,
out object value
)
public:
[ExtensionAttribute]
static bool TryReadQueryAs(
Uri^ address,
Type^ type,
[OutAttribute] Object^% value
)
static member TryReadQueryAs :
address:Uri *
type:Type *
value:Object byref -> bool
<ExtensionAttribute>
Public Shared Function TryReadQueryAs (
address As Uri,
type As Type,
<OutAttribute> ByRef value As Object
) As Boolean
Parameters
address
Type: System.UriThe URI to read.
type
Type: System.TypeThe type of object to read.
value
Type: System.ObjectWhen this method returns, contains an object that is initialized from the query component of the URI. This parameter is treated as uninitialized.
Return Value
Type: System.Boolean
true if the query component of the URI can be read as the specified type; otherwise, false.
Return to top
UriExtensions.TryReadQueryAs<T> Method (Uri, T)
Reads HTML form URL encoded data provided in the URI query string as an object of a specified type.
Syntax
public static bool TryReadQueryAs<T>(
this Uri address,
out T value
)
public:
generic<typename T>
[ExtensionAttribute]
static bool TryReadQueryAs(
Uri^ address,
[OutAttribute] T% value
)
static member TryReadQueryAs<'T> :
address:Uri *
value:'T byref -> bool
<ExtensionAttribute>
Public Shared Function TryReadQueryAs(Of T) (
address As Uri,
<OutAttribute> ByRef value As T
) As Boolean
Parameters
address
Type: System.UriThe URI to read.
value
Type: TWhen this method returns, contains an object that is initialized from the query component of the URI. This parameter is treated as uninitialized.
Return Value
Type: System.Boolean
true if the query component of the URI can be read as the specified type; otherwise, false.
Type Parameters
- T
The type of object to read.
Return to top