SynchronizedReadOnlyCollection.System.Collections.Generic.ICollection<T>.Add Method
Throws a NotSupportedException if called.
Namespace: System.Collections.Generic
Assembly: System.ServiceModel (in system.servicemodel.dll)
'Declaration
Private Sub System.Collections.Generic.ICollection<T>.Add ( _
value As T _
) Implements ICollection(Of T).Add
'Usage
Dim instance As SynchronizedReadOnlyCollection(Of T)
Dim value As T
CType(instance, ICollection(Of T)).Add(value)
void ICollection<T>.Add (
T value
)
private:
virtual void System.Collections.Generic.ICollection<T>.Add (
T value
) sealed = ICollection<T>::Add
Not applicable.
- value
The element to be added to the collection.
Exception type | Condition |
---|---|
NotSupportedException |
Items cannot be set in a read-only collection. |
Items cannot be added to a read-only collection.
The Microsoft .NET Framework 3.0 is supported on Windows Vista, Microsoft Windows XP SP2, and Windows Server 2003 SP1.
Supported in: 3.0
SynchronizedReadOnlyCollection Class
SynchronizedReadOnlyCollection Members
System.Collections.Generic Namespace