本文整理汇总了C#中ValueSet.ContainsKey方法的典型用法代码示例。如果您正苦于以下问题:C# ValueSet.ContainsKey方法的具体用法?C# ValueSet.ContainsKey怎么用?C# ValueSet.ContainsKey使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ValueSet
的用法示例。
在下文中一共展示了ValueSet.ContainsKey方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: validateStep1
private void validateStep1(ValueSet result)
{
if (result.Count != 1)
Error("Expected 1 user input value, but there were " + result.Count);
else if (!result.ContainsKey("message"))
Error("Expected a user input value for 'message', but there was none.");
else if (!(result["message"] as string).Equals("Windows 10"))
Error("User input value for 'message' was not 'Windows 10'");
else
{
stepsControl.Step = int.MaxValue;
}
}
示例2: validateStep1
private async void validateStep1(ValueSet result)
{
if (result.Count != 1)
await new MessageDialog("ERROR: Expected 1 user input value, but there were " + result.Count).ShowAsync();
else if (!result.ContainsKey("message"))
await new MessageDialog("ERROR: Expected a user input value for 'message', but there was none.").ShowAsync();
else if (!(result["message"] as string).Equals("Windows 10"))
await new MessageDialog("ERROR: User input value for 'message' was not 'Windows 10'").ShowAsync();
else
{
stepsControl.Step = int.MaxValue;
}
}