Save data ends with the '=' into property with any name, and you can't read
this value.
Error in function ReadValues()
way to solve: replace String.Split() to String.IndexOf() and
String.Substring() as following
private void ReadValues()
{
if (File.Exists(FilePath))
{
foreach (var row in File.ReadAllLines(FilePath))
{
int splitPos = row.IndexOf('=');
string[] rowData = new string[] { row.Substring(0,
splitPos), row.Substring(splitPos+1) };
Values[rowData[0]] = rowData[1];
}
}
else
throw new PropertyFileException(FilePath + " is invalid");
}
Original issue reported on code.google.com by AlexeusP...@gmail.com on 31 May 2010 at 7:46
Original issue reported on code.google.com by
AlexeusP...@gmail.com
on 31 May 2010 at 7:46