Hi Akram.19,
You need to typecast your TextBox using Integer.Parse in VB.Net and int.Parse in C#.
Once the typecasting done, then you can perform Subtraction.
Please refer below sample.
Code
C#
private void Subtract(object sender, EventArgs e)
{
int num1 = int.Parse(txtNum1.Text);
int num2 = int.Parse(txtNum2.Text);
int subtract = (num1 - num2);
lblTotal.Text = (subtract).ToString();
}
VB.Net
Private Sub Subtract(ByVal sender As Object, ByVal e As EventArgs)
Dim num1 As Integer = Integer.Parse(txtNum1.Text)
Dim num2 As Integer = Integer.Parse(txtNum2.Text)
Dim subtract As Integer = (num1 - num2)
lblTotal.Text = (subtract).ToString()
End Sub
Screenshot