<PackageReference Include="System.Collections.Immutable" Version="11.0.0-preview.3.26207.106" />

System.Runtime.InteropServices.ImmutableCollectionsMarshal

public static class ImmutableCollectionsMarshal
An unsafe class that provides a set of methods to access the underlying data representations of immutable collections.
namespace System.Runtime.InteropServices { public static class ImmutableCollectionsMarshal { public static ImmutableArray<T> AsImmutableArray<T>(T[] array); public static T[] AsArray<T>(ImmutableArray<T> array); public static Memory<T> AsMemory<T>(ImmutableArray<T>.Builder builder); } }