G
Guest
Why is it that I get these errors on this function
1.) The out parameter 'Avalues' must be assigned to before control leaves
the current method
2.) Use of unassigned local variable 'Avalues'
public bool getStringFieldAsArrayList( out ArrayList Avalues)
{
bool retVal=false ;
Avalues.Add("fooAvalues");
return retVal;
}
BUT NOT for this:
public void getOutString( out string test)
{
test ="foo";
}
They seem to be constructed the same way...
-
Andrew
1.) The out parameter 'Avalues' must be assigned to before control leaves
the current method
2.) Use of unassigned local variable 'Avalues'
public bool getStringFieldAsArrayList( out ArrayList Avalues)
{
bool retVal=false ;
Avalues.Add("fooAvalues");
return retVal;
}
BUT NOT for this:
public void getOutString( out string test)
{
test ="foo";
}
They seem to be constructed the same way...
-
Andrew