Well is there any other way to add elements to generic collections[list] or collection initializes etc ..
Well issue here is if i want to add say 100 elements over and over i dont want to use collectionobject.add() over and over which is no a good option right ..
So how to dynamically add elements to collection not using add method ...
Cheers
TY

Iftikar HussainPosted Aug 4, 2013, 11:36 AM
If you know the list of string data, then while initializing you can add the data as like below
otherwise declare array of string and add by AddRange
You can normal Add method, if you think you don't want to add same item again and again to same list, then before going to add you can always clear or remove the item from the list
Regards,
Iftikar
Iftikar HussainPosted Aug 5, 2013, 1:57 AM
Regards,
Iftikar
SUNIL GUTTAPosted Aug 4, 2013, 1:33 PM
Iftikar Hussain just too good .. i like it :)
Ty fellas for helping me
VulpesPosted Aug 4, 2013, 11:31 AM
Check this link:
http://msdn.microsoft.com/en-us/library/z883w3dc.aspx