Hi all,
I am using a UD method to create a list in a combobox in a configurator. The ipLength is always divisible by 75 and when the ‘BlankType’ is ‘B’ the maximum blanking length should be the ipLength - 75.
The code below works fine until I want to take 75 off the ipLength for ‘BlankType’ ‘B’, then I get an error telling me the input string is not of the correct format. The list is still created correctly however. Can anyone advise me as to what is causing my problem?
Much appreciated.
Adrian.
string opListItems = "";
int length = 0;
if (ipLength != "")
{
length = System.Convert.ToInt32(ipLength);
if (Inputs.cmbBlankType.Value == "B")
{
length = length - 75;
}
do
{
opListItems += length.ToString() + "~";
length = length - 75;
}
while (length > 0);
}
return opListItems;