public void ICollectionOptimization() { var source = new NonEnumerableCollection<string> { "hello", "there" }; // If ToList just iterated over the list, this would throw var list = source.ToList(); list.AssertSequenceEqual("hello", "there"); }
public void ICollectionOptimized() { var source = new NonEnumerableCollection <string> { "hello", "there" }; var list = source.ToList(); list.AssertSequenceEqual("hello", "there"); }
public void CollectionOptimization() { var source = new NonEnumerableCollection <string> { "One", "Two" }; var result = source.ToList(); result.AssertSequenceEqual("One", "Two"); }
public void ICollectionOptimization() { var source = new NonEnumerableCollection <string> { "hello", "there" }; // If ToList just iterated over the list, this would throw var list = source.ToList(); list.AssertSequenceEqual("hello", "there"); }