Tech
Forums
Jobs
Books
Events
Live
Interviews
More
Learn
Training
Career
Members
Videos
News
Blogs
Login
Sign Up
Ask Question
4
Reply
How to add a exact number of items to listbox from textbox.
raju patil
Oct 14 2014 12:52 AM
898
Reply
if (textBox1.Text != "" || textBox1.Text != "")
{
if (!listBox1.Items.Contains(textBox1.Text))
{
listBox1.Items.Add(textBox1.Text);
textBox1.Text = "";
}
I can add items to listbox by above code,
but i am not getting how to add exact number of items to listbox through textbox, For eg: i want to add only 7 items in listbox, if i try to add 8th item it should not take it. i know its normal question but i m new in C# could someone please help me.
Upload Source Code
Select only zip and rar file.
Post
Reset
Cancel
Answers (
4
)
Next Recommended Forum
Time difference between two times ?
Progressbar