Why is it that the List is so widely used, even when there is absolutly no need for the features of a List? I think one of the most important reasons is it beeing so easily available. You could simply use the extension method .ToList() on any IEnumerable.
To help out in this matter, and hopefully help you use other (more suitable) generic collection types, I've created this package. It contains extension methods for IEnumerable to convert it to:
Install-Package RJ.CollectionExtensions -Version 1.0.0
dotnet add package RJ.CollectionExtensions --version 1.0.0
<PackageReference Include="RJ.CollectionExtensions" Version="1.0.0" />
paket add RJ.CollectionExtensions --version 1.0.0
#r "nuget: RJ.CollectionExtensions, 1.0.0"
// Install RJ.CollectionExtensions as a Cake Addin #addin nuget:?package=RJ.CollectionExtensions&version=1.0.0 // Install RJ.CollectionExtensions as a Cake Tool #tool nuget:?package=RJ.CollectionExtensions&version=1.0.0
This is the fist published version, and contains no updates
This package has no dependencies.
This package is not used by any NuGet packages.
This package is not used by any popular GitHub repositories.