Click or drag to resize
ArrayAsReadOnlyT Method
Returns a read-only wrapper for the specified array.

Namespace: System
Assembly: mscorlib (in mscorlib.dll) Version: 4.0.0.0
Syntax
C#
public static ReadOnlyCollection<T> AsReadOnly<T>(
	T[] array
)

Parameters

array
Type: T
The one-dimensional, zero-based array to wrap in a read-only ReadOnlyCollectionT wrapper.

Type Parameters

T
The type of the elements of the array.

Return Value

Type: ReadOnlyCollectionT
A read-only ReadOnlyCollectionT wrapper for the specified array.
Exceptions
ExceptionCondition
ArgumentNullExceptionarray is null.
See Also