Handling a NullReferenceException in C

De openkb
Aller à : Navigation, rechercher

Sommaire

Questions

   This question already has an answer here:
    * /questions/4660142/what-is-a-nullreferenceexception-and-how-do-i-fix-it /questions/4660142/what-is-a-nullreferenceexception-and-how-do-i-fix-it 23 answers

Answers

You have not initialized your array. try this. May be this could help you.

 items=new string[]{""};
 items[size] = name;

Source

License : cc by-sa 3.0

http://stackoverflow.com/questions/41776422/handling-a-nullreferenceexception-in-c-sharp

Related

Outils personnels
Espaces de noms

Variantes
Actions
Navigation
Outils