![]() | asCollectionAsCollectionT Method |
Namespace: WhetStone.Looping
public static ICollection<T> AsCollection<T>( this IEnumerable<T> this, bool force = true, bool ensureReadOnly = false )
If force is , the return value will never be null.
Without force set to , this will only be wrapped if it is ICollectionT, IReadOnlyCollectionT, or String
If this is IReadOnlyCollectionT or String, the return value will be read-only.