Array.AsReadOnly<T>(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.
Returns a read-only wrapper for the specified array.
public:
generic <typename T>
static System::Collections::ObjectModel::ReadOnlyCollection<T> ^ AsReadOnly(cli::array <T> ^ array);
public static System.Collections.ObjectModel.ReadOnlyCollection<T> AsReadOnly<T>(T[] array);
static member AsReadOnly : 'T[] -> System.Collections.ObjectModel.ReadOnlyCollection<'T>
Public Shared Function AsReadOnly(Of T) (array As T()) As ReadOnlyCollection(Of T)
Type Parameters
- T
The type of the elements of the array.
Parameters
- array
- T[]
The one-dimensional, zero-based array to wrap in a read-only ReadOnlyCollection<T> wrapper.