HttpRouteCollection.TryGetValue Method

Gets the IHttpRoute with the specified route name.

Namespace:  System.Web.Http
Assembly:  System.Web.Http (in System.Web.Http.dll)

Syntax

'Declaration
Public Overridable Function TryGetValue ( _
    name As String, _
    <OutAttribute> ByRef route As IHttpRoute _
) As Boolean
'Usage
Dim instance As HttpRouteCollection
Dim name As String
Dim route As IHttpRoute
Dim returnValue As Boolean

returnValue = instance.TryGetValue(name, _
    route)
public virtual bool TryGetValue(
    string name,
    out IHttpRoute route
)
public:
virtual bool TryGetValue(
    String^ name, 
    [OutAttribute] IHttpRoute^% route
)
abstract TryGetValue : 
        name:string * 
        route:IHttpRoute byref -> bool 
override TryGetValue : 
        name:string * 
        route:IHttpRoute byref -> bool 
public function TryGetValue(
    name : String, 
    route : IHttpRoute
) : boolean

Parameters

Return Value

Type: System.Boolean
true if the collection contains an element with the specified name; otherwise, false.

See Also

Reference

HttpRouteCollection Class

System.Web.Http Namespace