using System;
using System.Windows.Forms;
namespace WindowsApplication1
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
private void button1_Click(object sender, EventArgs e)
{
try
{
string str = "true";
bool flag = System.Convert.ToBoolean(str);
MessageBox.Show("flg value is " + flag);
}
catch (Exception ex)
{
MessageBox.Show("Cannot conver the value" + ex.ToString() );
}
}
}
}