Questions tagged [addrange]

83 questions
4
votes
0 answers

How to replace addRange() for multiple selection in Google Chrome?

I need to copy multiple nodeElements. Selection.addRange(), could help me but, Google Chrome removed this feature. I tried to add multiple ranges and do string concatenation but formatting removing by using it. var range =…
4
votes
1 answer

F# add a list of buttons to a form control range

I have created the following code in F#: open System.Drawing open System.Windows.Forms let form = new Form(Text="project", TopMost=true, Width=400, Height=400) let defaultSize = new Size(20,20) let buttonPos text x y = new Button(Text=text,…
4
votes
1 answer

Add Range from one list to another

I have a list(of string) and I search it to get a start and end range, I then need to add that range to a separate list ex: List A = "a" "ab" "abc" "ba" "bac" "bdb" "cba" "zba" I need List B to be all the b's (3-5) What I want to do is…
Dman
  • 553
  • 1
  • 11
  • 33
4
votes
1 answer

C# listview imagelist fast add many items

I have a ListView and ImageList in C# on my form and read a directory with about 1000 files maximum. I pre-populate the ListView and ImageList with the count of the fileItems DummyItems with the AddRange methods to avoid the flickering and scolling…
feedwall
  • 1,473
  • 7
  • 28
  • 48
3
votes
4 answers

How to specify range >2GB for HttpWebRequest in .NET 3.5

I'm building this class to download files in parts/sections/segments. In .NET 4.0, I can use this code to specify the range to download from long startPos = int.MaxValue+1; HttpWebRequest.AddRange(startPos); and it works because there is a long…
Alex Essilfie
  • 12,339
  • 9
  • 70
  • 108
3
votes
3 answers

Adding multiple items to a combo box using AddRange

Baically I'm looking for something like this... cbo_Genre.Items.AddRange({"Horror", "Comedy"});
John
  • 13,197
  • 7
  • 51
  • 101
3
votes
2 answers

How to remove duplicate value when using list AddRange? C#

I am analyse and making windows service application. When I make Insert query, I add the columns using List and AddRange. In List pmlist = new List(keys); line, it contains {@DeptCode}. Then…
Ryden Choi
  • 307
  • 4
  • 19
3
votes
1 answer

C# List AddRange - does it copy the items of add by reference

Say, I have 3 lists List l1 List l1,l2,l3 All the 3 lists has many items I want to add all of them to a single list List finalList finalList.AddRange(l1) , similarly for l2 and l3. While doing finalList.AddRange does it…
PickUpTruck
  • 63
  • 1
  • 5
3
votes
0 answers

StackOverflowException - query result set is too big?

My query below checks through over 2000 categories categoriesToCheck and find articles within those categories. I guess it is too big to add to a generic list? I'm getting an error from this line below…
Ray
  • 311
  • 2
  • 6
  • 15
3
votes
4 answers

Implement AddRange on ObservableCollection with proper support for DataBinding

I would like my own descendant of ObservableCollection to support AddRange method. Here is what I currently have: public class ObservableCollectionPlus : ObservableCollection { public void InsertRange(IEnumerable items) { …
src091
  • 2,807
  • 7
  • 44
  • 74
2
votes
1 answer

How can I set a many-to-many EntityCollection in Entity Framework efficiently?

When Entity Framework generates an ObjectContext for a two database tables (let's say Table1 and Table2) connected with a many-to-many relationship table, it doesn't create an object for the xref table, opting instead for collection properties on…
2
votes
2 answers

EF 6.0 DBSet.AddRange() - How to skip individual entity errors

I am trying to push 100 Product entities created dynamically, using DBSet.AddRange(). If for example, 1st Product entity has some data issues and throws exception during Commit(), all remaining 99 product entities also not going to save. Is it…
Jaish Mathews
  • 766
  • 1
  • 9
  • 25
2
votes
2 answers

How to add a list of entities and How can I get Id

I have a problem with Entity Framework in Asp.net mvc . I want to get the Id value whenever I add a list of entities to database. How can I do this? i use this code for add a list of entities to database : public IEnumerable
testStack201541
  • 119
  • 1
  • 9
2
votes
4 answers

Use AddRange for a new List

How to: Use AddRange for a List List list = new List().AddRange(File.ReadAllLines(path, Encoding.UTF8); It is a variable which is declared globally - what is my mistake? The error is equal to Converting from string to void is…
sjantke
  • 605
  • 4
  • 9
  • 35
2
votes
0 answers

Calculating ip range

Ive ran into a slight "problem" if you can call it that. Im trying to learn subnets and make a subnet calculator. Everything is working but the problem arises when you get a netmask like 255.255.0.0 which gives you a possible ~65k ish addresses. I…
Gvs
  • 267
  • 1
  • 6
  • 16