本文整理汇总了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")