Dim condicion As String
Dim cond As Boolean
Dim a As Integer
Dim b As Integer
a = 25
b = 0
condicion = "a >= 20 And b <= 50"
cond = Convert.ToBoolean(condicion)
If cond Then
b = a
End If
Console.Out.WriteLine(a)
Console.Out.WriteLine(b)
Console.ReadLine()
End Sub
I have the following question, I have a variable String:
Dim condicion As String = "a >= 20 And b <= 50"
I would like to convert it to boolean to be able to use it in an if and I can not find a way to do it, it would be very helpful, thanks, and I'll test with Convert.ToBoolean (condition) and I still get an error, thanks