CollectionExtensions.cs List<T>.AddRange(Span<T>)

This commit is contained in:
wrenge 2024-11-13 12:09:29 +03:00
parent dbc92a9aef
commit 2c6f6a50cc
1 changed files with 6 additions and 0 deletions

View File

@ -45,5 +45,11 @@ namespace DotRecast.Core.Collections
(list[k], list[n]) = (list[n], list[k]);
}
}
public static void AddRange<T>(this IList<T> list, Span<T> span)
{
foreach (var i in span)
list.Add(i);
}
}
}