MimePartCollection.Remove Method
.NET Framework 2.0
Removes the first occurrence of the specified MimePart from the MimePartCollection.
Namespace: System.Web.Services.Description
Assembly: System.Web.Services (in system.web.services.dll)
Assembly: System.Web.Services (in system.web.services.dll)
This method performs a linear search; therefore, the average execution time is proportional to Count.
The elements that follow the removed MimePart move up to occupy the vacated spot.
The following example demonstrates a typical use of the Remove method.
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");
}
Windows 98, Windows Server 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
The Microsoft .NET Framework 3.0 is supported on Windows Vista, Microsoft Windows XP SP2, and Windows Server 2003 SP1.Community Additions
ADD
Show: