Can anyone help me out with the code. I'm getting the Null Reference Object Exception at the following line
textFile1_Paras[paraNumber] = line;
I'm trying to separate paragraphs from a text file into string array
int paraNumber = 0;
string[] lines = File.ReadAllLines(filePath1);
foreach (string line in lines)
{
while (line != string.Empty)
{
textFile1_Paras[paraNumber] = line;
}
paraNumber++;
}
MessageBox.Show(textFile1_Paras[paraNumber]);