R
Rob
I am an Xtreme newbie to C# and am trying to build an array of strings. I
get the following error and don't know what I'm doing wrong.
System.NullReferenceException: Object reference not set to an instance of an
object.
Here is a diliuted example.
string[] strArray;
string strValue;
int intIndex = 0;
str_value = "Test";
for( intIndex = 1; intIndex < 10; intIndex++ )
{
strArray[intIndex] = strValue;
intIndex++;
}
get the following error and don't know what I'm doing wrong.
System.NullReferenceException: Object reference not set to an instance of an
object.
Here is a diliuted example.
string[] strArray;
string strValue;
int intIndex = 0;
str_value = "Test";
for( intIndex = 1; intIndex < 10; intIndex++ )
{
strArray[intIndex] = strValue;
intIndex++;
}