c#的Boolean.Parse用法

bool val;
string input;

input = bool.TrueString;
val = bool.Parse(input);
Console.WriteLine("'{0}' parsed as {1}", input, val);
// The example displays the following output:
//       'True' parsed as True

  Boolean.TrueString        将布尔值 true 表示为一个字符串。 此字段为只读

posted on 2018-09-25 10:38  jiahuafu  阅读(2597)  评论(0编辑  收藏  举报

导航