I have a variable which is a boolean datatype and using the windows console I am looking to store use input inside it. I know how to do this using if statements and data validation, but I am looking to see if vb has a method to handle this naturally?
For the sake of showing some code:
Dim tOrF As Boolean
tOrF = Console.ReadLine
Thanks
You can use
TryParsemethod to check if the value being entered is a valid boolean value or else it will throw an exception,