MimePartCollection.Remove メソッド
MimePartCollection から、最初に出現する指定した MimePart を削除します。
Public Sub Remove( _
ByVal mimePart As MimePart _)
[C#]
public void Remove(MimePartmimePart);
[C++]
public: void Remove(MimePart* mimePart);
[JScript]
public function Remove(
mimePart : MimePart);
パラメータ
- mimePart
コレクションから削除する MimePart 。
解説
このメソッドはリニア サーチを実行します。したがって、平均検索時間は Count に比例します。
空白になった位置を埋めるために、削除された MimePart の後にある要素の位置が繰り上がります。
使用例
[Visual Basic, C#, C++] Remove メソッドの典型的な使用例を次に示します。
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
[C#]
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");
}
[C++]
Console::WriteLine(S"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(S"Mimepart is succesfully removed from mimepartcollection");
[JScript] JScript のサンプルはありません。Visual Basic、C#、および C++ のサンプルを表示するには、このページの左上隅にある言語のフィルタ ボタン をクリックします。
必要条件
プラットフォーム: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 ファミリ
参照
MimePartCollection クラス | MimePartCollection メンバ | System.Web.Services.Description 名前空間