LinkedList.System.Collections.Generic.ICollection<T>.Add メソッドとは? わかりやすく解説

Weblio 辞書 > コンピュータ > .NET Framework クラス ライブラリ リファレンス > LinkedList.System.Collections.Generic.ICollection<T>.Add メソッドの意味・解説 

LinkedList.System.Collections.Generic.ICollection.Add メソッド

メモ : このメソッドは、.NET Framework version 2.0新しく追加されたものです。

ICollection末尾アイテム追加します

名前空間: System.Collections.Generic
アセンブリ: System (system.dll 内)
構文構文

Private Sub System.Collections.Generic.ICollection<T>.Add
 ( _
    value As T _
) Implements ICollection(Of TKey).Add
Dim instance As LinkedList(Of
 T)
Dim value As T

CType(instance, ICollection(Of TKey)).Add(value)
void ICollection<TKey>.Add (
    T value
)
private:
virtual void System.Collections.Generic.ICollection<T>.Add
 (
    T value
) sealed = ICollection<TKey>::Add

パラメータ

value

ICollection の末尾追加する値。

解説解説

LinkedList は、null 参照 (Visual Basic では Nothing) を参照型に対して有効な Value として受け取り、値の重複許可します

LinkedList が空の場合新しノードFirst および Lastなります

このメソッドは O(1) 操作です。

使用例使用例

LinkedListICollectionキャストされるときに、LinkedList.System.Collections.Generic.ICollection<T>.Add メソッド使用してリンク リスト末尾新しノード追加するコード例および出力次に示します。このコード例では、文字列リンク リスト最後ノード削除し新しノード追加します

このコード例および出力は、LinkedList クラストピック取り上げている例の一部分です。

        ' When the linked list is cast to ICollection(Of String),
        ' the Add method adds a node to the end of the list. 
        sentence.RemoveLast()
        Dim icoll As ICollection(Of
 String) = sentence
        icoll.Add("rhinoceros")
        Display(sentence)
<br /><span space="preserve">...</span><br
 />'the quick brown dog jumped over the lazy rhinoceros
        // When the linked list is cast to ICollection(Of String),
        // the Add method adds a node to the end of the list. 
        sentence.RemoveLast();
        ICollection<string> icoll = sentence;
        icoll.Add("rhinoceros");
        Display(sentence);
<br /><span space="preserve">...</span><br />//the
 quick brown dog jumped over the lazy rhinoceros
    // When the linked list is cast to ICollection(Of String),
    // the Add method adds a node to the end of the list. 
    sentence->RemoveLast();
    ICollection<String^>^ icoll = sentence;
    icoll->Add("rhinoceros");
    Display(sentence);
<br /><span space="preserve">...</span><br />//the
 quick brown dog jumped over the lazy rhinoceros
プラットフォームプラットフォーム
バージョン情報バージョン情報
参照参照


このページでは「.NET Framework クラス ライブラリ リファレンス」からLinkedList.System.Collections.Generic.ICollection<T>.Add メソッドを検索した結果を表示しています。
Weblioに収録されているすべての辞書からLinkedList.System.Collections.Generic.ICollection<T>.Add メソッドを検索する場合は、下記のリンクをクリックしてください。
 全ての辞書からLinkedList.System.Collections.Generic.ICollection<T>.Add メソッドを検索

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

辞書ショートカット

すべての辞書の索引

LinkedList.System.Collections.Generic.ICollection<T>.Add メソッドのお隣キーワード
検索ランキング

   

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



LinkedList.System.Collections.Generic.ICollection<T>.Add メソッドのページの著作権
Weblio 辞書 情報提供元は 参加元一覧 にて確認できます。

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

©2024 GRAS Group, Inc.RSS