从字符串转换

基本类型 / 布尔类型

using System;

var str = "true";
var boolValue = bool.Parse(str);
//boolValue is True

Console.WriteLine(boolValue);