Legend

Class
Struct
Enum
Interface
Delegate
Constructor
Method
Property
Event
Field

Constructor: ValuesCollection<TValue>(List<TValue>, bool)

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>valuesThe list to wrap. May be null for an empty read-only wrapper.
boolisReadOnlySpecifies 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.