I want to sort a list of custom objects by object property numerical values.
For example, I have custom object
MyList = MyList.OrderBy(Function(i) i.A).ToList()
Then this is not a double-property but a string which displays doubles. Either always convert this string to double which isn't very efficient, or store them as
double and only convert them to strings where you need to display them (recommended).
However, here is the
MyList = MyList.OrderBy(Function(i) Double.Parse(i.A)).ToList()
If it contains dots and you use commas(as commented) use:
MyList = MyList.OrderBy(Function(i) Double.Parse(i.A, CultureInfo.InvariantCulture)).ToList()