Please Don't Worry You can Solve NullException problem Using one of the two methods :) . 1) If you create Your own Array Please Initalize it.
List<String> strArray= new List<String>();
strArray.Add("Code Project");
Here new List<String>(); is important
- If you get the list from any where else You can check for null as follows
if(strArray != null)
if(strArray.Count >0)
MessageBox.Show(strArray[0]);