Array datatype incorrect

  • Thread starter Thread starter labjac
  • Start date Start date
L

labjac

Guest
Hallo

Can somebody please have a look and tell me where I'm going wrong.

Got a number generator that will create values for a combobox but I cannot have the return type.

public class WallNumberGenerator
{

public Array NumberGenerator(int StartNumber, int MaxNumber)
{
int numberOfLoops = MaxNumber - StartNumber;
string[] rowlocationArr = new string[numberOfLoops + 1];
int rowLocationIndexer = 0;
int rowValueIndexer = StartNumber;

while (rowLocationIndexer <= numberOfLoops)
{
if ((rowValueIndexer).ToString().Length == 1)
{
rowlocationArr[rowLocationIndexer] = "0" + rowValueIndexer.ToString();
}
else
{
rowlocationArr[rowLocationIndexer] = rowValueIndexer.ToString();
}
rowValueIndexer++;
rowLocationIndexer++;
}
return rowlocationArr;
}
}

private Array LoadDefaultNrZones()
{
int startNumberZones = 1;
int maxNumberZones = 99;
Array zoneComboBox;

WCS_Core.WallConfigurators.WallNumberGenerator wallNrGenerator = new WCS_Core.WallConfigurators.WallNumberGenerator();
zoneComboBox = wallNrGenerator.NumberGenerator.wallNrGenerator(startNumberZones, maxNumberZones);

return zoneComboBox;
}







labjac

Continue reading...
 
Back
Top