how to get sum of two numbers in vb.net?
Answers were Sorted based on User's Feedback
Answer / rinkymishra
dim x,y,z as integer
x=(textbox1.text)
y=(textbox2.text)
z=x+y
textbox3.text=z
Is This Answer Correct ? | 1 Yes | 0 No |
Answer / prashant
windows form application vb.net
Private Sub Button1_Click(ByVal sender As System.Object,
ByVal e As System.EventArgs) Handles Button1.Click
Dim a As Integer
Dim b As Integer
Dim c As Integer
a = Convert.ToInt32(Me.TextBox3.Text)
b = Convert.ToInt32(Me.TextBox11.Text)
c = a * b
TextBox13.Text = c
End Sub
Is This Answer Correct ? | 0 Yes | 0 No |
Answer / philip mahama
You need to create a new project and add two text-box, the first textbox, one label
Which name should be changed to sumlabel and a button for the calculation
Then double click on the button and add this code.
Dim num1, num2, sum as double
‘ Initialize sum to zero
Sum = 0
num1=double.parse(Textbox1.text)
num2=double.parse(Textbox2.text)
‘Calculate sum
Sum = num1 + num2
‘Print sum
Sumlabel.text = sum
Is This Answer Correct ? | 0 Yes | 0 No |
Answer / aman
Sub Main()
Dim x, y As Integer
Console.Write("Enter value of x: ")
x = Console.ReadLine()
Console.Write("Enter value of y: ")
y = Console.ReadLine()
Console.Write("Sum x+y = ")
Console.WriteLine(x + y)
Console.ReadLine()
End Sub
Is This Answer Correct ? | 5 Yes | 8 No |
Before in my vb app I would just load the icons from dll. How can I load the icons provided by .net dynamically?
Described strong typing and weak typing?
What is sorting in vb?
What are nested classes?
How does vb.net achieve polymorphism?
sir how i can calculate the value of two-textbox of gridview and show result in textbox within gridview in asp.net with vb.net..plz sir reply me
What are jagged arrays ?
hi,everyone. i got a problem in handling linklabels. i've more than one linklabels in a form. i used following event handler to handle the event 'LinkClicked' of Linklabel. private sub LinkLabel1_LinkClicked() Handles LinkLabel1.LinkClicked,LinkLabel2.LinkClicked ............... .......... end sub My question is how to identify the 'Linklabel1' and 'Linklabel2'. i dont want to handle the events of linklabels individually.
What is the use of errorprovider control?
What is globalization?
What is "Friend" in VB.Net?
What is the size of .net object?