public void should_copy_itself_to_an_array() { var setToCopy = new ConcurrentSet<int>(Enumerable.Range(1, 5)); var destinationArray = new int[5]; setToCopy.CopyTo(destinationArray, 0); destinationArray.ShouldEqual(new[] { 1, 2, 3, 4, 5 }); }
public void should_copy_itself_to_an_array() { var setToCopy = new ConcurrentSet <int>(Enumerable.Range(1, 5)); var destinationArray = new int[5]; setToCopy.CopyTo(destinationArray, 0); destinationArray.ShouldEqual(new[] { 1, 2, 3, 4, 5 }); }
public void CopyTo(T[] array, int arrayIndex) { objects.CopyTo(array, arrayIndex); }