mohsen dorparasti mohsen dorparasti - 1 year ago 106
C# Question

how to add a range of items to the IList variable

there is no

method for

How can I add a list of items to a
without iterating through items and using
method ?

Answer Source

AddRange is defined on List<T>, not the interface.

You can declare the variable as List<T> instead of IList<T> or cast it to List<T> in order to gain access to AddRange.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download