List iteration using span


var list = new List<int>();
foreach(var item in CollectionsMarshal.AsSpan(list))
{
  
}

Only usable if the collection is not changed during iteration (read only)


Revision #6
Created 2022-09-15 17:39:29 UTC by Guest
Updated 2024-08-30 11:20:50 UTC by Guest