openbuildings gc TryParse not working

Hi Communities,

Have recently updated Openbuildings to v10.09.02.36.

Have tried to open an existing file with a function i created that extracts a double out of a string through a loop.

Getting an error when trying to test if char is a number or not using double.TryParse

string a = Schedule[i][3].ToCharArray();
string b;
double val;
double test = 0;
for (int t=0; t< a.Count; t++)
{
    bool success = double.TryParse(a[t], out test));
    if (success || a[t] == '.')
        b += a[t];
}
if (b.Length>0)
    val = double.Parse(b);

Get error "Expected an expression; instead, found: double"

Is TryParse no longer supported in openbuildings or is there something wrong with my install?

Regards,

Josh

Parents Reply Children
No Data