Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR CSHARP

c# string to bool

Console.WriteLine(Boolean.TryParse("false", out bool myBool));
// Output: True
// If you want to use "false" in its boolean variable, try:
Console.WriteLine(myBool);
// Output: False
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #string #bool
ADD COMMENT
Topic
Name
4+3 =