how to get sum of two numbers in vb.net?

Answer Posted / 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



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Explain about jagged arrarys ?

594


What is sealed class?

685


Explain namespace?

663


How vb implements the disconnected architecture as like vb.net?

660


What do you understand by vb.net?

688






What is break mode? What are the options to step through code?

620


what is commom language runtime?

627


Explain clr?

649


Explain code security?

595


Explain the use of serialization and deserialization?

611


Explain cls?

670


Explain about Visual basic.NET culture?

670


What is a literal control?

650


What is the use of console application?

656


Define serialization in .net?

717