Its not a "safe" operation, though it is a useful one to gain access to the prebuilt array; without first copying using .ToArray()
namespace System.Runtime.InteropServices
{
public partial static class CollectionsMarshal
{
public Span<T> AsSpan(List<T> list);
public Memory<T> AsMemory(List<T> list);
}
}
/cc @jkotas