implement a really basic AddRange<T> method for a generic IList<T> and an IEnumerable<T>
This commit is contained in:
parent
43fc5b7a67
commit
4b3dc58803
@ -54,5 +54,13 @@ namespace MBS.Framework.Collections.Generic
|
|||||||
}
|
}
|
||||||
return ((List<T>)(cacheOfT[obj][typeof(T)])).ToArray();
|
return ((List<T>)(cacheOfT[obj][typeof(T)])).ToArray();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static void AddRange<T>(this IList<T> list, IEnumerable<T> items)
|
||||||
|
{
|
||||||
|
foreach (T item in items)
|
||||||
|
{
|
||||||
|
list.Add(item);
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user