bool.Parse : Parse « Data Types « C# / C Sharp






bool.Parse

  

using System;
using System.Collections.Generic;
using System.Text;

class Program {
    static void Main(string[] args) {
        bool myBool = bool.Parse("True");
        Console.WriteLine("-> Value of myBool: {0}", myBool);
    }
}

   
  








Related examples in the same category

1.char.Parse
2.int.Parse
3.double.Parse
4.parse decimal
5.Determines whether the supplied number is an integer.
6.Determines whether the supplied number is a decimal number.
7.Determines whether the supplied number is of numeric type.
8.Is Valid Integer