G
Guest
I am working on code that I have posted several questions on, they have been
helpful, but as I am new to programming, I have come across something else I
am not sure how to fix. This is a build error referring to an unassigned
local variable. The problem is this variable was defined in a local
procedure and is therefore not available when I need to use it. I have
posted a bit of the code I am working on, the bit with the problems. How can
I go about reworking this code to be able to use the results of splitting the
arraylist and using the resulting array 'aFields'? Any help is very much
appreciated.
foreach (string aOutput in aColumn)
{
aFields = aOutput.Split(new char[] {' '});
}
//Define maxRow to equal the upper bound of the aFields array
maxRow = aFields.GetUpperBound(0);
//For each i less than or equal to maxRow
for (int i=0; i <= maxRow;i++)
{
//Creates new double array
AFields = new double[maxRow +1];
helpful, but as I am new to programming, I have come across something else I
am not sure how to fix. This is a build error referring to an unassigned
local variable. The problem is this variable was defined in a local
procedure and is therefore not available when I need to use it. I have
posted a bit of the code I am working on, the bit with the problems. How can
I go about reworking this code to be able to use the results of splitting the
arraylist and using the resulting array 'aFields'? Any help is very much
appreciated.
foreach (string aOutput in aColumn)
{
aFields = aOutput.Split(new char[] {' '});
}
//Define maxRow to equal the upper bound of the aFields array
maxRow = aFields.GetUpperBound(0);
//For each i less than or equal to maxRow
for (int i=0; i <= maxRow;i++)
{
//Creates new double array
AFields = new double[maxRow +1];