HttpRouteCollection.TryGetValue Method (String, IHttpRoute)
Gets the IHttpRoute with the specified route name.
Namespace: System.Web.Http
Assembly: System.Web.Http (in System.Web.Http.dll)
Syntax
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 Overridable Function TryGetValue (
name As String,
<OutAttribute> ByRef route As IHttpRoute
) As Boolean
Parameters
name
Type: System.StringThe route name.
route
Type: System.Web.Http.Routing.IHttpRouteWhen this method returns, contains the IHttpRoute instance, if the route name is found; otherwise, null. This parameter is passed uninitialized.
Return Value
Type: System.Boolean
true if the collection contains an element with the specified name; otherwise, false.
See Also
HttpRouteCollection Class
System.Web.Http Namespace
Return to top