LinkedList.System.Collections.Generic.ICollection.Add メソッド
アセンブリ: System (system.dll 内)

Private Sub System.Collections.Generic.ICollection<T>.Add ( _ value As T _ ) Implements ICollection(Of TKey).Add
private: virtual void System.Collections.Generic.ICollection<T>.Add ( T value ) sealed = ICollection<TKey>::Add

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

LinkedList が ICollection にキャストされるときに、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

Windows 98, Windows 2000 SP4, Windows CE, Windows Millennium Edition, Windows Mobile for Pocket PC, Windows Mobile for Smartphone, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition
開発プラットフォームの中には、.NET Framework によってサポートされていないバージョンがあります。サポートされているバージョンについては、「システム要件」を参照してください。


Weblioに収録されているすべての辞書からLinkedList.System.Collections.Generic.ICollection<T>.Add メソッドを検索する場合は、下記のリンクをクリックしてください。

- LinkedList.System.Collections.Generic.ICollection<T>.Add メソッドのページへのリンク