Questions tagged [addrange]

83 questions
2
votes
1 answer

using a win form combo box Items.AddRange method

I have an array of objects that I'm trying to add to the Items collection of a combo box control using the AddRange method. The method takes an object[] but when I pass it the name of the array which has been intialized with some values, it…
kinakuta
  • 9,029
  • 1
  • 39
  • 48
1
vote
3 answers

AddRange adding to which of my collections?

Upon looking into the following code I am unable to figure out the this.AddRange(hoteltasks); on line 21. I want to know to which collection the AddRange method adds the elements of hoteltasks. public class HotelViewModel :…
1
vote
1 answer

C# How to insert bulk of data using List.AddRange more efficiently

I am trying to insert data from a third party (Sage)'s Rest API to Azure SQL directly using C# code. While I am trying to add about 30,000 rows of data, I got bottom error at line 66 where it has resultList.AddRange(result.Data); I only tried with…
Java
  • 1,208
  • 3
  • 15
  • 29
1
vote
0 answers

How do i copy a component which has image and text with all its format and styling in React

I have a preview component which renders dynamically:
Jdavydz
  • 21
  • 3
1
vote
2 answers

Modify Range in Line Chart with GoogleScript

I want to be able to have a user select a month range (i.e start month and end month) and then have my charts update based on the selection. In this example it is Jan - Sep of 2021. I have written another script that performs a query to select a…
1
vote
0 answers

Auto selection (addRange) method not works properly while type the text too fast

While type the text in 4th row very fast ("Apple") the auto selection not works properly as expected. But while editing the single text it works as expected(selection works). Please check the below html…
1
vote
1 answer

WebRequest.AddRange doesn't return the correct Content-Length

I want to download a file in a url partially. But it returns the wrong content size and i couldn't figure out why. The remote file has Accept-Ranges=bytes How can it be solved? long start = 536871935, end = 805306878; string url =…
Ali Tor
  • 2,772
  • 2
  • 27
  • 58
1
vote
0 answers

Which interface does AddRange() belong to in List?

List implements the following interfaces: IList ICollection IList ICollection IReadOnlyList IReadOnlyCollection IEnumerable IEnumerable None of them has AddRange(). Which interface does AddRange() belong to in List?
user366312
  • 16,949
  • 65
  • 235
  • 452
1
vote
1 answer

how can I use C# HttpClient to download a part of large file

How can I use C# HttpClient to download a part of large file, like HttpWebRequest.AddRange(123)? public async void StartDownload(CancellationToken cancellationToken) { try { if (_isWork) return; _isWork = true; …
ZhidongHan
  • 11
  • 2
1
vote
0 answers

How can I toggle contenteditable H1 inside of ordered lists in Chrome?

Create ordered list via document.execCommand('insertOrderedList') Create h1 via document.execCommand('formatBlock', null, 'h1') Toggle h1 via document.execCommand('formatBlock', null, 'div') Expected: DOM replaces

with
Actual: chrome puts…
dras
  • 138
  • 4
  • 14

1
vote
1 answer

C# List AddRange of DBNull.Value
I would like to initialize a list with a given number of items, all with value DBNull.Value, is this possible via AddRange? This code initializes as nulls and not DBNull.Value _cellList = new List(new DBNull[_columns.Count]); Whereas this…
Alex
  • 2,247
  • 1
  • 27
  • 37
1
vote
1 answer

How to make an addAll() or addRange() method from scratch in java?

I'm trying to do a linkedlist for an assigment i have, this ask explicitly to create, from scratch a linkedlist and some derivated types like a queue and a stack, this is just some college homework, and i realize how to make a node class and a…
user57129
  • 309
  • 1
  • 6
  • 17
1
vote
2 answers

AddRange/concat functionality inside a lambda Select expression

class Foo { int PrimaryItem; bool HasOtherItems; IEnumerable OtherItems; } List fooList; How do I get a list of all item ids referenced inside fooList? var items = fooList .Select( /* …
fearofawhackplanet
  • 52,166
  • 53
  • 160
  • 253
1
vote
1 answer

HttpWebRequest AddRange() with an unsupported Server

I'm writing some code in C# to download files from the web servers. I'm testing with some links which support a 'byte-range' request, so not sure what would happen with unsupported servers. HttpWebRequest request =…
Jenix
  • 2,996
  • 2
  • 29
  • 58
1
vote
2 answers

Using linq select a multiple price values

var filterModel = new List() { new FilterModel {Price = 1}, new FilterModel {Price = 1}, new FilterModel {Price = 15}, new FilterModel {Price = 20}, new FilterModel {Price = 410}, new FilterModel…
user3583183
  • 91
  • 1
  • 5