本文整理匯總了C#中System.Web.Services.Description.BindingCollection.Contains方法的典型用法代碼示例。如果您正苦於以下問題:C# BindingCollection.Contains方法的具體用法?C# BindingCollection.Contains怎麽用?C# BindingCollection.Contains使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。
在下文中一共展示了BindingCollection.Contains方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的C#代碼示例。
示例1: if
ServiceDescription myServiceDescription = ServiceDescription.Read("MathService_input.wsdl");
Console.WriteLine("Total Number of bindings defined are:" + myServiceDescription.Bindings.Count);
myBinding = myServiceDescription.Bindings[0];
// Remove the first binding in the collection.
myServiceDescription.Bindings.Remove(myBinding);
Console.WriteLine("Successfully removed binding " + myBinding.Name);
Console.WriteLine("Total Number of bindings defined now are:" + myServiceDescription.Bindings.Count);
myServiceDescription.Write("MathService_temp.wsdl");
// Add binding to the ServiceDescription instance.
myServiceDescription.Bindings.Add(myBinding);
if (myServiceDescription.Bindings.Contains(myBinding))
Console.WriteLine("Successfully added binding " + myBinding.Name);