Hinweis
Für den Zugriff auf diese Seite ist eine Autorisierung erforderlich. Sie können versuchen, sich anzumelden oder das Verzeichnis zu wechseln.
Für den Zugriff auf diese Seite ist eine Autorisierung erforderlich. Sie können versuchen, das Verzeichnis zu wechseln.
Entfernt das erste Vorkommen des angegebenen MimePart aus der MimePartCollection.
Namespace: System.Web.Services.Description
Assembly: System.Web.Services (in system.web.services.dll)
Syntax
'Declaration
Public Sub Remove ( _
mimePart As MimePart _
)
'Usage
Dim instance As MimePartCollection
Dim mimePart As MimePart
instance.Remove(mimePart)
public void Remove (
MimePart mimePart
)
public:
void Remove (
MimePart^ mimePart
)
public void Remove (
MimePart mimePart
)
public function Remove (
mimePart : MimePart
)
Parameter
- mimePart
Der aus der Auflistung zu entfernende MimePart.
Hinweise
Diese Methode führt eine lineare Suche aus. Die durchschnittliche Ausführungszeit ist daher proportional zu Count.
Die Elemente, die auf den entfernten MimePart folgen, werden nach oben verschoben, um die frei gewordene Stelle einzunehmen.
Beispiel
Das folgende Beispiel veranschaulicht eine typische Verwendung der Remove-Methode.
Console.WriteLine("Removing a mimepart object...")
' Remove the mimepart from the mimepartcollection.
myMimePartCollection.Remove(myMimePart1)
' Check whether the mimepart is removed or not.
If Not myMimePartCollection.Contains(myMimePart1) Then
Console.WriteLine("Mimepart is succesfully removed from mimepartcollection")
End If
Console.WriteLine("Removing a mimepart object...");
// Remove the mimepart from the mimepartcollection.
myMimePartCollection.Remove(myMimePart1);
// Check whether the mimepart is removed or not.
if(!myMimePartCollection.Contains(myMimePart1))
{
Console.WriteLine("Mimepart is succesfully removed from mimepartcollection");
}
Console::WriteLine( "Removing a mimepart object..." );
// Remove the mimepart from the mimepartcollection.
myMimePartCollection->Remove( myMimePart1 );
// Check whether the mimepart is removed or not.
if ( !myMimePartCollection->Contains( myMimePart1 ) )
Console::WriteLine( "Mimepart is succesfully removed from mimepartcollection" );
Console.WriteLine("Removing a mimepart object...");
// Remove the mimepart from the mimepartcollection.
myMimePartCollection.Remove(myMimePart1);
// Check whether the mimepart is removed or not.
if (!(myMimePartCollection.Contains(myMimePart1))) {
Console.WriteLine("Mimepart is succesfully removed "
+ "from mimepartcollection");
}
Plattformen
Windows 98, Windows 2000 SP4, Windows Millennium Edition, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition
.NET Framework unterstützt nicht alle Versionen sämtlicher Plattformen. Eine Liste der unterstützten Versionen finden Sie unter Systemanforderungen.
Versionsinformationen
.NET Framework
Unterstützt in: 2.0, 1.1, 1.0
Siehe auch
Referenz
MimePartCollection-Klasse
MimePartCollection-Member
System.Web.Services.Description-Namespace