UriTemplate.QueryValueVariableNames Egenskap
Definition
Viktigt
En del information gäller för förhandsversionen av en produkt och kan komma att ändras avsevärt innan produkten blir allmänt tillgänglig. Microsoft lämnar inga garantier, uttryckliga eller underförstådda, avseende informationen som visas här.
Hämtar en samling variabelnamn som används i frågesträngen i mallen.
public:
property System::Collections::ObjectModel::ReadOnlyCollection<System::String ^> ^ QueryValueVariableNames { System::Collections::ObjectModel::ReadOnlyCollection<System::String ^> ^ get(); };
public System.Collections.ObjectModel.ReadOnlyCollection<string> QueryValueVariableNames { get; }
member this.QueryValueVariableNames : System.Collections.ObjectModel.ReadOnlyCollection<string>
Public ReadOnly Property QueryValueVariableNames As ReadOnlyCollection(Of String)
Egenskapsvärde
En samling mallvariabelnamn som visas i frågedelen av mallsträngen.
Exempel
I följande exempel visas hur du kommer åt egenskapen QueryValueVariableNames .
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);
}
Dim template As UriTemplate = New UriTemplate("weather/{state}/{city}?forecast={day}")
Dim prefix As Uri = New Uri("http://localhost")
Console.WriteLine("QueryValueVariableNames:")
For Each name As String In template.QueryValueVariableNames
Console.WriteLine(" {0}", name)
Next
Kommentarer
Den här samlingen exkluderar variabelnamn som visas i sökvägsavsnittet i mallsträngen.