ServiceDescriptionCollection.Insert(Int32, ServiceDescription) Metod
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.
Lägger till den angivna ServiceDescription instansen ServiceDescriptionCollection i det angivna nollbaserade indexet.
public:
void Insert(int index, System::Web::Services::Description::ServiceDescription ^ serviceDescription);
public void Insert(int index, System.Web.Services.Description.ServiceDescription serviceDescription);
member this.Insert : int * System.Web.Services.Description.ServiceDescription -> unit
Public Sub Insert (index As Integer, serviceDescription As ServiceDescription)
Parametrar
- index
- Int32
Det nollbaserade index där parametern ska infogas serviceDescription .
- serviceDescription
- ServiceDescription
Att ServiceDescription lägga till i samlingen.
Undantag
Exempel
// Insert a ServiceDescription into the collection.
myCollection->Insert( 1, myServiceDescription2 );
// Insert a 'ServiceDescription' object into the collection.
myCollection.Insert(1, myServiceDescription2);
' Insert a 'ServiceDescription' object into the collection.
myCollection.Insert(1, myServiceDescription2)
Kommentarer
Om antalet objekt i samlingen redan är lika med samlingens kapacitet, fördubblas kapaciteten genom att den interna matrisen omplaceras automatiskt innan det nya elementet infogas.
Om parametern index är lika med Countläggs parametern serviceDescription till i slutet av ServiceDescriptionCollection.
Elementen efter insättningspunkten flyttas ned för att rymma det nya elementet.