J
Joe Fallon
I built up a string in code and now I wish to evaluate it using Cbool but I
get a runtime error.
This is my expression:
?CBool("11=10 OrElse 11=11")
Run-time exception thrown : System.InvalidCastException - Cast from string
"11=10 OrElse 11=11" to type 'Boolean' is not valid.
If I remove the quotes manually from the string the expression works as I
had hoped:
?CBool(11=10 OrElse 11=11)
True
The question is: how do you build up the string programatically and then
evaluate it using Cbool?
get a runtime error.
This is my expression:
?CBool("11=10 OrElse 11=11")
Run-time exception thrown : System.InvalidCastException - Cast from string
"11=10 OrElse 11=11" to type 'Boolean' is not valid.
If I remove the quotes manually from the string the expression works as I
had hoped:
?CBool(11=10 OrElse 11=11)
True
The question is: how do you build up the string programatically and then
evaluate it using Cbool?