文章内容
2016/12/9 17:11:00,作 者: 黄兵
C# 字符串转换为Bool类型
C# 字符串转换为Bool类型的方法:
1、判断等于某个值:
string aKey="stringValue";
if(aKey== "stringValue1")
{
MessageBox.Show(“转换成功!!!");
}
else
{
MessageBox.Show("转换失败!!!");
}
string aKey="stringValue";
if(aKey== "stringValue1")
{
MessageBox.Show(“转换成功!!!");
}
else
{
MessageBox.Show("转换失败!!!");
}
评论列表