StringCollection.Add Method (String)
.NET Framework (current version)
Adds a string to the end of the StringCollection.
Assembly: System (in System.dll)
Parameters
- value
-
Type:
System.String
The string to add to the end of the StringCollection. The value can be null.
StringCollection accepts null as a valid value and allows duplicate elements.
If Count is less than the capacity, this method is an O(1) operation. If the capacity needs to be increased to accommodate the new element, this method becomes an O(n) operation, where n is Count.
The following code example adds new elements to the StringCollection.
Universal Windows Platform
Available since 10
.NET Framework
Available since 1.1
Available since 10
.NET Framework
Available since 1.1
Show: