Answer the question
In order to leave comments, you need to log in
Object reference not set to an instance of an object. Why? If the values are not empty?
I send data to the server. They are not empty. I receive a response from the server and after 1-2 seconds I get the exception Object reference not set to an instance of an object.
What am I doing wrong? And from what it arises, if the data is not empty, as far as I understand?
Answer the question
In order to leave comments, you need to log in
If you replace it with this code, it works
string strValue = lstbox.SelectedValue as string;
string MyValue= listBoxfilesAndDirectoriesInServerList.SelectedValue.ToString() ;
MessageBox.Show(MyValue);
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question