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
raju patil
NA
54
8.4k
How to add a exact number of items to listbox from textbox.
Oct 14 2014 12:52 AM
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.
Reply
Answers (
4
)
Time difference between two times ?
Progressbar