Question: ```
class test
{
    public void read()
    {
       int a=convert.toint32(textbox1.text);
    }
}

```

Error shows that String format is not correct Can any one solve this....

Answer: 
Use `Int32.TryParse` to make sure the value in textbox1 is convertable into `int`

```
class test
{
    public void read()
    {
       int a = 0;
       if(Int32.TryParse(textbox1.Text, out a))
       {
           // a is the integer from the textbox
       }
       else
       {
           MessageBox.Show("The textbox does not contain a number!");
       }
    }
}

```
It means that the value of `textbox1.text` is not integer.