Which method can be used to set the values in combo box from within code?

How about using ComboBox instance then press "dot"....?

hi
this simple example u can set data in combobox
for (int i = 0; i < 10; i++)
{
comboBox1.Items.Add(i);
}
comboBox1.SelectedIndex = 0;

plz follow the advice of "Atenka" and "Ramy Mahrous"

bye

commented: Helps with code a lot :) +5

Pressing F1 on a component will take you to the MSDN help which has examples, its really not overly hard

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.