Export (0) Print
Expand All

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.

Namespace:  System.Net.Http
Assembly:  System.Net.Http.Formatting (in System.Net.Http.Formatting.dll)

public static bool TryReadQueryAs(
	this Uri address,
	Type type,
	out Object value
)

Parameters

address
Type: System.Uri
The URI to read.
type
Type: System.Type
The type of object to read.
value
Type: System.Object%
When 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.

Usage Note

In Visual Basic and C#, you can call this method as an instance method on any object of type Uri. When you use instance method syntax to call this method, omit the first parameter. For more information, see http://msdn.microsoft.com/en-us/library/bb384936(v=vs.108).aspx or http://msdn.microsoft.com/en-us/library/bb383977(v=vs.108).aspx.
Show:
© 2014 Microsoft