I want to generate conditional code of the string, which will check the string. An example is the following string sampleString = "C123 A091 A111 A122 B120 B309 C000" and examples of conditional string I have is as follows
example 1 : A123 + B123 would I generate as
if sampleString.contains ("A123") And sampleString.contains ("B123") Then
'doSomething
else
'doSomething
end if
example 2 : A111+A122+(B120/-C123)
if sampleString.contains ("A111") And sampleString.contains ("A122") And (sampleString.contains ("B120") Or Not sampleString.contains ("C123")) Then
'doSomething
else
'doSomething
end if
- Plus (+) means AND
- Minus (-) means NOT
- Slash (/) means OR
Will I be able to do this in VB.Net?