TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
Sanu
NA
33
49.8k
Whic code is more correct?
Oct 22 2012 8:57 AM
Hi
I've 10 combo boxes in a form. Want to populate all cmbbxes with values - numbers from 1 to 10. Is this code ok or do u suggest ny othr code?
public void BindCombos()
{
for (int i = 1; i <= 10; i++)
{
cmbDependability.Items.Add(i);
cmbAdaptability.Items.Add(i);
cmbAppearance.Items.Add(i);
cmbInitiative.Items.Add(i);
cmbResponsibility.Items.Add(i);
cmbQualityOfWork.Items.Add(i);
cmbAttitude.Items.Add(i);
cmbQuantityOfWork.Items.Add(i);
cmbAttendance.Items.Add(i);
cmbJobKnowledge.Items.Add(i);
}
}
private void Performance_Load(object sender, EventArgs e)
{
BindCombos();
}
Reply
Answers (
10
)
help me to add dynamically textboxe to a form when clicking button and reterive data in that text box wen cliking another button
Windows Form Does not working Sequentially?Please Suggest