SoapHeaderCollection.Remove メソッドとは? わかりやすく解説

Weblio 辞書 > コンピュータ > .NET Framework クラス ライブラリ リファレンス > SoapHeaderCollection.Remove メソッドの意味・解説 

SoapHeaderCollection.Remove メソッド

SoapHeaderCollection 内で最初に見つかった特定の SoapHeader削除します

名前空間: System.Web.Services.Protocols
アセンブリ: System.Web.Services (system.web.services.dll 内)
構文構文

Public Sub Remove ( _
    header As SoapHeader _
)
Dim instance As SoapHeaderCollection
Dim header As SoapHeader

instance.Remove(header)
public void Remove (
    SoapHeader header
)
public:
void Remove (
    SoapHeader^ header
)
public void Remove (
    SoapHeader header
)

パラメータ

header

SoapHeaderCollection から削除する SoapHeader。

解説解説

削除されSoapHeader後続SoapHeader 要素が上に移動して空白になった場所を占有します。

使用例使用例
' Check to see whether the collection contains mySecondSoapHeader.
If mySoapHeaderCollection.Contains(mySecondSoapHeader) Then
    ' Get the index of mySecondSoapHeader from the collection.
    Console.WriteLine("Index of mySecondSoapHeader: "
 & _
        mySoapHeaderCollection.IndexOf(mySecondSoapHeader).ToString())

    ' Get the SoapHeader from the collection.
    Dim mySoapHeader1 As MySoapHeader = CType(mySoapHeaderCollection(
 _
        mySoapHeaderCollection.IndexOf(mySecondSoapHeader)), _
        MySoapHeader)
    Console.WriteLine("SoapHeader retrieved from the collection:
 " _
        & mySoapHeader1.ToString())

   ' Remove a SoapHeader from the collection.
   mySoapHeaderCollection.Remove(mySoapHeader1)
   Console.WriteLine("Number of items after removal: {0}",
 _
       & mySoapHeaderCollection.Count)
Else
Console.WriteLine( _
    "mySoapHeaderCollection does not contain mySecondSoapHeader.")
End If
// Check to see whether the collection contains mySecondSoapHeader.
if(mySoapHeaderCollection.Contains(mySecondSoapHeader))
{
    // Get the index of mySecondSoapHeader from the collection.
    Console.WriteLine("Index of mySecondSoapHeader: " + 
        mySoapHeaderCollection.IndexOf(mySecondSoapHeader));

    // Get the SoapHeader from the collection.
    MySoapHeader mySoapHeader1 = (MySoapHeader)mySoapHeaderCollection
        [mySoapHeaderCollection.IndexOf(mySecondSoapHeader)];
    Console.WriteLine("SoapHeader retrieved from the collection: " 
        + mySoapHeader1);

    // Remove a SoapHeader from the collection.
    mySoapHeaderCollection.Remove(mySoapHeader1);
    Console.WriteLine("Number of items after removal: {0}", 
        mySoapHeaderCollection.Count);
}
else
    Console.WriteLine(
        "mySoapHeaderCollection does not contain mySecondSoapHeader.");
// Check to see whether the collection contains mySecondSoapHeader.
if ( mySoapHeaderCollection->Contains( mySecondSoapHeader )
 )
{
   // Get the index of mySecondSoapHeader from the collection.
   Console::WriteLine( "Index of mySecondSoapHeader: {0}", mySoapHeaderCollection->IndexOf(
 mySecondSoapHeader ) );

   // Get the SoapHeader from the collection.
   MySoapHeader^ mySoapHeader1 = dynamic_cast<MySoapHeader^>(mySoapHeaderCollection[
 mySoapHeaderCollection->IndexOf( mySecondSoapHeader ) ]);
   Console::WriteLine( "SoapHeader retrieved from the collection: {0}",
 mySoapHeader1 );

   // Remove a SoapHeader from the collection.
   mySoapHeaderCollection->Remove( mySoapHeader1 );
   Console::WriteLine( "Number of items after removal: {0}", mySoapHeaderCollection->Count
 );
}
else
      Console::WriteLine( "mySoapHeaderCollection does not contain mySecondSoapHeader."
 );
// Check to see whether the collection contains mySecondSoapHeader.
if (mySoapHeaderCollection.Contains(mySecondSoapHeader)) {
    // Get the index of mySecondSoapHeader from the collection.
    Console.WriteLine("Index of mySecondSoapHeader: " 
        + mySoapHeaderCollection.IndexOf(mySecondSoapHeader));
    // Get the SoapHeader from the collection.
    MySoapHeader mySoapHeader1 = (MySoapHeader)mySoapHeaderCollection.
        get_Item(mySoapHeaderCollection.IndexOf(mySecondSoapHeader));
    Console.WriteLine("SoapHeader retrieved from the collection: " 
        + mySoapHeader1);
    // Remove a SoapHeader from the collection.
    mySoapHeaderCollection.Remove(mySoapHeader1);
    Console.WriteLine("Number of items after removal: {0}", 
        System.Convert.ToString(mySoapHeaderCollection.get_Count()));
}
else {
    Console.WriteLine("mySoapHeaderCollection does not contain "
        + "mySecondSoapHeader.");
}
プラットフォームプラットフォーム
バージョン情報バージョン情報
参照参照
関連項目
SoapHeaderCollection クラス
SoapHeaderCollection メンバ
System.Web.Services.Protocols 名前空間
Remove
IList
SoapHeader クラス



英和和英テキスト翻訳>> Weblio翻訳
英語⇒日本語日本語⇒英語
  

辞書ショートカット

すべての辞書の索引

SoapHeaderCollection.Remove メソッドのお隣キーワード
検索ランキング

   

英語⇒日本語
日本語⇒英語
   



SoapHeaderCollection.Remove メソッドのページの著作権
Weblio 辞書 情報提供元は 参加元一覧 にて確認できます。

   
日本マイクロソフト株式会社日本マイクロソフト株式会社
© 2024 Microsoft.All rights reserved.

©2024 GRAS Group, Inc.RSS