IEnumerableExtensionsAsReadOnlyT Method
Returns a read-only ReadOnlyCollectionT wrapper
for the specified collection.
Namespace: DevCase.Extensions.IEnumerableExtensionsAssembly: DevCase.net48 (in DevCase.net48.dll) Version: 6.0.0.0 (6.0)
XMLNS for XAML: Not mapped to an xmlns.
[EditorBrowsableAttribute(EditorBrowsableState.Always)]
public static ReadOnlyCollection<T> AsReadOnly<T>(
this IEnumerable<T> collection
)
<ExtensionAttribute>
<EditorBrowsableAttribute(EditorBrowsableState.Always)>
Public Shared Function AsReadOnly(Of T) (
collection As IEnumerable(Of T)
) As ReadOnlyCollection(Of T)
Dim collection As IEnumerable(Of T)
Dim returnValue As ReadOnlyCollection(Of T)
returnValue = collection.AsReadOnly()
public:
[ExtensionAttribute]
[EditorBrowsableAttribute(EditorBrowsableState::Always)]
generic<typename T>
static ReadOnlyCollection<T>^ AsReadOnly(
IEnumerable<T>^ collection
)
[<ExtensionAttribute>]
[<EditorBrowsableAttribute(EditorBrowsableState.Always)>]
static member AsReadOnly :
collection : IEnumerable<'T> -> ReadOnlyCollection<'T>
No code example is currently available or this language may not be supported.
- collection IEnumerableT
-
The source collection.
- T
-
The type of the collection.
ReadOnlyCollectionT
The resulting
ReadOnlyCollectionT.
In Visual Basic and C#, you can call this method as an instance method on any object of type
IEnumerableT. When you use instance method syntax to call this method, omit the first parameter. For more information, see
Extension Methods (Visual Basic) or
Extension Methods (C# Programming Guide).