Questions tagged [addrange]

83 questions
0
votes
2 answers

Combining two lists to make a third list - error

I have two lists of classes - 'deliveries' and 'pickups' - and I'm trying to make a third list which would add deliveries and pickups together, ie a list to display ALL deliveries AND pickups instead of one or the other. After searching for a bit, I…
user1860676
  • 55
  • 1
  • 9
0
votes
1 answer

Combobox in winform and many entries

I'm trying to get a combobox in winform that has around 5'000 entries. I've run into a problem before - addrange hangs with this many entries. I created a seperate control to do this for myself without lagging, but I'm adding this functionality to…
Charles
  • 548
  • 1
  • 7
  • 25
0
votes
2 answers

Why can't I use AddRange to add subclassed items?

I have two classes.... Parcel and FundParcel...and I'm trying to convert an IEnumerable of the subtype to an IList of the supertype.... public class FundParcel : Parcel { /* properties defined here */ } public class Parcel { /* properties…
mezoid
  • 28,090
  • 37
  • 107
  • 148
-1
votes
1 answer

How to add items to an existing list using AddRange

Am trying to update records and save changes to the database and it seems as i can't because i cannot get my list. sorry if my question is not clear. Let me know if there's other way i can do it. List ClaimLogs = new …
Mpho
  • 13
  • 2
  • 11
-1
votes
1 answer

Write array to phpexcel

I have a following array and need to write into excel using phpexcel I can directly write the array to excel. array(9) { [0] => array(4) { 'hostname' => string(7) 'Dibeesh' 'hostemail' => string(14) 'xxx@xx.in' 'hostcity'…
Lal Mohan
  • 323
  • 1
  • 7
  • 21
-1
votes
1 answer

Copying a List of T

I am using VS2012, vb.net. If I have a list of type t, and I wish to copy this to another list, the following code works: list2.Clear() list2.AddRange(list1) However, if the first list of t has another list of type t2 inside it, this above code…
Garry
  • 1,251
  • 9
  • 25
  • 45
-2
votes
3 answers

Add a list to another list in c#

I have a List A as below var act= (from a in _db.Activities where a.UserID == userid select new SchoolDetail { SchoolName = a.School, …
Kristy
  • 279
  • 6
  • 18
-3
votes
2 answers

Unable to use "Add Range" to copy a list in a Class to another list in other Class

public partial class Form1 : Form { public Form1() { InitializeComponent(); } class mylist { public List list1 = new List(); } class mylist2 { public List list2 = new…
Raja
  • 3
  • 5
1 2 3 4 5
6