Declaration
public ValuesCollection<TValue>(
List<TValue> values,
bool isReadOnly
)
Summary
Creates a wrapper for the specified list instance. The list may be null to represent an empty
wrapper provided that the wrapper is read-only.
Parameters
List<TValue> | values | The list to wrap. May be null for an empty read-only wrapper. |
bool | isReadOnly | Specifies whether the wrapper allows the wrapped list to be modified. |
Remarks
This constructor does NOT create a copy of the list. Thus, even if
isReadOnly is true,
the list may still be modified if a reference to the list is accessed elsewhere. Consider only passing in lists which you
created and are not passed or used anywhere else.