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
Sriram Ramki
NA
20
4.8k
what is object reference not set to an instance of an object
Oct 31 2018 11:15 PM
In Windows Form , I Created ComboBox, when i try to Create a new name, it doesn't show any output. Instead of that it is showing " System.NullReferenceException : 'Object reference is not set to an instance of an object.
private void btnCountry_Click(object sender, EventArgs e)
{
MessageBox.Show(comboBox1.Text);
MessageBox.Show(comboBox1.SelectedItem.ToString());MessageBox.Show(comboBox1.SelectedIndex.ToString());
this.Close();
}
private void btnStates_Click(object sender, EventArgs e)
{
foreach(object obj in listBox1.SelectedItems)
{
MessageBox.Show(obj.ToString());
}
}
Reply
Answers (
5
)
Table Named not present in the EDM
How to call a method with valuetype . Its Urgetnt please