HashSet<T>.ICollection<T>.Add(T) Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Adds an item to an ICollection<T> object.
virtual void System.Collections.Generic.ICollection<T>.Add(T item) = System::Collections::Generic::ICollection<T>::Add;
void ICollection<T>.Add(T item);
abstract member System.Collections.Generic.ICollection<T>.Add : 'T -> unit
override this.System.Collections.Generic.ICollection<T>.Add : 'T -> unit
Sub Add (item As T) Implements ICollection(Of T).Add
Parameters
- item
- T
The object to add to the ICollection<T> object.
Implements
Exceptions
The ICollection<T> is read-only.
Remarks
If Count is less than Capacity, this method is an O(1) operation. If the capacity must be increased to accommodate the new element, this method becomes an O(n
) operation, where n
is Count.
Applies to
GitHub で Microsoft と共同作業する
このコンテンツのソースは GitHub にあります。そこで、issue や pull request を作成および確認することもできます。 詳細については、共同作成者ガイドを参照してください。
.NET