What is the difference between Span and Memory in C# 7.2?
Span<T> is stack-only in nature while Memory<T> can exist on the heap. Span<T> is a new type we are adding to the platform to represent contiguous regions of arbitrary memory, with performance characteristics on par with T[]. Its APIs are similar to the array, but unlike arrays, it can point to either managed or native … Read more