addrange Questions
2
Solved
namespace SubscriptionWebsite.PlaceHolders
{
public class TreeData
{
public int ID { get; set; }
public int? ParentLocationID { get; set; }
public string name { get; set; }
public int? Locat...
1
I'm trying to find a solution in C# to extending a list in O(1).
List's AddRange() method is of course an O(n) operation.
This should have been something that LinkedList supports, but LinkedList d...
Grande asked 8/1, 2020 at 8:31
6
Solved
There is no AddRange() method for IList<T>.
How can I add a list of items to an IList<T> without iterating through the items and using the Add() method?
Record asked 31/10, 2012 at 12:36
13
Solved
I want to be able to add a range and get updated for the entire bulk.
I also want to be able to cancel the action before it's done (i.e. collection changing besides the 'changed').
Related Q
Wh...
Carmencarmena asked 22/3, 2009 at 5:8
3
Solved
With a list you can do:
list.AddRange(otherCollection);
There is no add range method in a HashSet.
What is the best way to add another ICollection to a HashSet?
Vienne asked 7/3, 2013 at 9:9
4
Solved
How do you split a string to a List? I'm looking for the equivalent of ToCharArray but instead to make it a List.
string data = "ABCDEFGHIJ1fFJKAL";
List<string> datalist = new List<strin...
2
Solved
I have a custom BindingList that I want create a custom AddRange method for.
public class MyBindingList<I> : BindingList<I>
{
...
public void AddRange(IEnumerable<I> vals)
{
...
Thurlough asked 10/4, 2017 at 19:8
2
Solved
Consider the the piece of code below. I need to call the method CreateOrAddToLists() in a loop. First time the method is called the two lists casedata.Cases and casedata.Documents will be null, hen...
2
Solved
Consider the following example:
IEnumerable<Int32> groupsToAdd = new List<Int32>();
List<Int32> groups1 = new List<Int32>() { 1,2,3 };
List<Int32> groups2 = new List...
Hunan asked 20/8, 2013 at 19:52
2
Solved
I have a List of List of Strings, and I need to use the AddRange() Function to add set of items to it, but never duplicate items.
I used the following code :
List<List<string>> eList ...
4
Solved
I have the following scenario where I want to add some items to a List...
List<T> items = new List<T>();
IEnumerable<T> addItems = someCollection.Where(...);
items.AddRange(addIt...
Flush asked 31/7, 2012 at 23:49
4
Solved
I have a little problem, I have an array and I want to add that in a Combobox, so I want to use the AddRange method, but it isn't available in WPF, is there a way that I can do it in the combobox?
...
4
Solved
I have an interface defined as below:
public interface TestInterface{
int id { get; set; }
}
And two Linq-to-SQL classes implementing that interface:
public class tblTestA : TestInterface{
pu...
3
Solved
Profiling my C# application indicated that significant time is spent in List<T>.AddRange. Using Reflector to look at the code in this method indicated that it calls List<T>.InsertRange ...
Striction asked 23/1, 2010 at 12:44
5
Solved
Hi I'm trying to append 1 list to another. I've done it using AddRange() before but it doesn't seem to be working here... Here's the code:
IList<E> resultCollection = ((IRepository<E, C&g...
Orpiment asked 12/11, 2009 at 19:9
1
© 2022 - 2025 — McMap. All rights reserved.