Adds a set of items to the
ICollection.
Syntax
Exceptions
Example
Library/Library.Test/TestBTreeList.cs
C# | Copy Code |
---|
BTreeList<int> data = new BTreeList<int>(Comparer, GetSample());
BTreeList<int> copy = new BTreeList<int>();
copy.AddRange(data);
Assert.AreEqual(copy.Count, data.Count);
IList<int> lista = data, listb = copy;
for (int ix = 0; ix < data.Count; ix++)
Assert.AreEqual(lista[ix], listb[ix]); |
VB.NET | Copy Code |
---|
Dim data As New BTreeList(Of Integer)(Comparer, GetSample())
Dim copy As New BTreeList(Of Integer)()
copy.AddRange(data)
Assert.AreEqual(copy.Count, data.Count)
Dim lista As IList(Of Integer) = data, listb As IList(Of Integer) = copy
Dim ix As Integer = 0
While ix < data.Count
Assert.AreEqual(lista(ix), listb(ix))
System.Math.Max(System.Threading.Interlocked.Increment(ix),ix - 1)
End While |
Requirements
Target Platforms: Windows XP, Windows Server 2003, Windows Vista, Windows Server 2008, Windows 7
See Also