This documentation is archived and is not being maintained.

UriTemplate.QueryValueVariableNames Property

Gets a collection of variable names used within the query string in the template.

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

public ReadOnlyCollection<string> QueryValueVariableNames { get; }

Property Value

Type: System.Collections.ObjectModel.ReadOnlyCollection<String>
A collection of template variable names that appear in the query portion of the template string.

This collection excludes variable names that appear in the path section of the template string.

The following example shows how to access the QueryValueVariableNames property.

UriTemplate template = new UriTemplate("weather/{state}/{city}?forecast={day}");
Uri prefix = new Uri("http://localhost");

Console.WriteLine("QueryValueVariableNames:");
foreach (string name in template.QueryValueVariableNames)
{
    Console.WriteLine("     {0}", name);
}

Windows 7, Windows Vista, Windows XP SP2, Windows Server 2008 R2, Windows Server 2008, Windows Server 2003

The .NET Framework and .NET Compact Framework do not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.

.NET Framework

Supported in: 3.5
Show: