I am trying to cast a string to double, but I don’t want it to throw exception, but to return some value. I found the TryCast function but it seems I am not using it right. I try TryCast(string, Double) and it says that “Double” is a value type, not a reference type. What am I doing wrong?
I am trying to cast a string to double, but I don’t want it
Share
Double.TryParse(string, double)