Hi,
I want to fill data in my combo box using Add range method.

cboFirst.Items.Add("Sunday")
        cboFirst.Items.Add("Monday")
        cboFirst.Items.Add("Tuesday")
        cboFirst.Items.Add("Wednesday")
        cboFirst.Items.Add("Thursday")
        cboFirst.Items.Add("Friday")
        cboFirst.Items.Add("Saturday")

This is how im filling my combo with days. i want to do the Same but by using Add Range Method.
Please guide how,its urgent.

Addrange method expects the array to be passed. Get all ur items in Array wich u want to add to combo. And pass the array in AddRange method...

Dim days() As String = {"Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"}
        ComboBox1.Items.AddRange(days)

Thanks PG
Thats exactly what i needed,
Thanks alot

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.