本文整理匯總了VB.NET中System.Web.Services.Description.PortCollection.Insert方法的典型用法代碼示例。如果您正苦於以下問題:VB.NET PortCollection.Insert方法的具體用法?VB.NET PortCollection.Insert怎麽用?VB.NET PortCollection.Insert使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類System.Web.Services.Description.PortCollection
的用法示例。
在下文中一共展示了PortCollection.Insert方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的VB.NET代碼示例。
示例1: myPortArray
myPortCollection = myService.Ports
' Create an array of Port objects.
Console.WriteLine(ControlChars.NewLine & "Port collection :")
Dim myPortArray(myService.Ports.Count) As Port
myPortCollection.CopyTo(myPortArray, 0)
Dim i1 As Integer
For i1 = 0 to myService.Ports.Count -1
Console.WriteLine("Port[" & i1.ToString + "] : " & _
myPortArray(i1).Name)
Next
Dim myIndexPort As Port = myPortCollection(0)
Console.WriteLine(ControlChars.NewLine + ControlChars.NewLine + _
"The index of port '" + myIndexPort.Name + "' is : " + _
myPortCollection.IndexOf(myIndexPort).ToString)
Dim myPortTestInsert As Port = myPortCollection(0)
myPortCollection.Remove(myPortTestInsert)
myPortCollection.Insert(0, myPortTestInsert)
Console.WriteLine(ControlChars.NewLine + ControlChars.NewLine + _
"Total Number of Ports after inserting " + "a new port '" + _
myPortTestInsert.Name + "' is : " + myService.Ports.Count.ToString)
While i1 < myService.Ports.Count
Console.WriteLine("Port[" + i1.ToString + "] : " + myPortArray(i1).Name)
End While
myServiceDescription.Write("MathServiceCopyToNew_vb.wsdl")