I would like to read the key from the ini file and load it into the listbox.
Everything works until the ini key exceeds 255 characters, then it gives an error
ini look like here:
[Islands]
name=Island1-6,Island2-6,Island3-6,Island4-6,stash-1,Island5-6,Island6-6,Island7-6,Island8-6,stash-1,Island9-6,Island10-6,Islandname11-6,Islandname12-6,stash-1,Islandname13-6,Islandname14-6,Islandname15-6,Islandname16-6,234234-1,2334-2,234324-3,234324-5,123123-3,end
int v = 0;
//Loop:;
string t1Stone = new IniFile(iniFilePath).Read("name", "Islands");
Console.WriteLine(t1Stone);
string[] t1StoneValues = t1Stone.Split(',');
Loop:;
string t10 = t1StoneValues[v];
if (t10 == "end")
{
goto Start;
}
else
{
if (t10 == "")
{
goto Start;
}
else
{
listBoxWyspy.Items.Add(t10);
v++;
if (v < 1000)
{
goto Loop;
}
else
{
return;
}
}
}
Start:;
Michal O is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.