title: How is the new C# Span<T> different from ArraySegment<T>?
body: <p>I am having trouble conceptualizing the usages for <a href="https://docs.microsoft.com/en-us/archive/msdn-magazine/2018/january/csharp-all-about-span-exploring-a-new-net-mainstay" rel="nofollow noreferrer">the new Span&lt;T&gt; in C#</a>.</p>
  <ol>
  <li><p>What construct(s) does it replace? Is ArraySegment&lt;T&gt; now obsolete?</p>
  </li>
  <li><p>What functionality does it enable that previously was not?</p>
  </li>
  <li><p>Is Span&lt;T&gt; a valid replacement for C# Arrays? In which cases yes, in which cases no?</p>
  </li>
  <li><p>When will I use an ArraySegment&lt;T&gt; instead of a Span&lt;T&gt;?</p>
  </li>
  </ol>
  <p>I'm trying to understand how my coding styles will need to change to make effective use of the new Span&lt;T&gt;.</p>