Hi maddyrafi,
Please use int.Parse method for typecasting in numbers, refer below sample.
Code
C#
private void Calculate(object sender, EventArgs e)
{
int a = int.Parse(txtA.Text);
int b = int.Parse(txtB.Text);
txtTotal.Text = (a+b).ToString();
}
VB.Net
Private Sub Calculate(ByVal sender As Object, ByVal e As EventArgs)
Dim a As Integer = Integer.Parse(txtA.Text)
Dim b As Integer = Integer.Parse(txtB.Text)
txtTotal.Text = (a + b).ToString()
End Sub
Screenshot