I am new to c#. i wanted to know how to add or remove options in a combo box or list box during runtime

maybe this microsoft tutorial will help???

maybe this microsoft tutorial will help???

um that link sucks.

but to add an item its something like

comboBoxID.Items.Add("text","value");

um that link sucks.

but to add an item its something like

comboBoxID.Items.Add("text","value");

AND HOW WILL WE DO IT IN J#

It's the same way in J#.

It's the same way in J#.

no it is not
there is no option called .items.add

no it is not
there is no option called .items.add

It's the same way, not the same syntax. Sorry, I should have been more clear. :( The property in J# is called get_Items() to account for language details. It's always a good idea to look for differences in classes for the different .NET languages on MSDN, because if the feature you want is supported by the framework itself, the language will support it too, and the method for using it will be comparable. :)

It's the same way, not the same syntax. Sorry, I should have been more clear. :( The property in J# is called get_Items() to account for language details. It's always a good idea to look for differences in classes for the different .NET languages on MSDN, because if the feature you want is supported by the framework itself, the language will support it too, and the method for using it will be comparable. :)

but still how to add items
please tell in detail,i am new to .NET

MSDN gives example code that adds items. I don't mind, but other people won't like it if you ask a question that's obviously answered by freely available documentation. ;)

commented: great answer! +7
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.