From 2c6f6a50cc9c4e41855d5c5987b6cbcc2cebef81 Mon Sep 17 00:00:00 2001 From: wrenge Date: Wed, 13 Nov 2024 12:09:29 +0300 Subject: [PATCH] CollectionExtensions.cs List.AddRange(Span) --- src/DotRecast.Core/Collections/CollectionExtensions.cs | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/DotRecast.Core/Collections/CollectionExtensions.cs b/src/DotRecast.Core/Collections/CollectionExtensions.cs index 82f5f5c..c610899 100644 --- a/src/DotRecast.Core/Collections/CollectionExtensions.cs +++ b/src/DotRecast.Core/Collections/CollectionExtensions.cs @@ -45,5 +45,11 @@ namespace DotRecast.Core.Collections (list[k], list[n]) = (list[n], list[k]); } } + + public static void AddRange(this IList list, Span span) + { + foreach (var i in span) + list.Add(i); + } } } \ No newline at end of file