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 how can we remove handlers at run time?

551


Explain an assembly and its use?

531


Which control is an example of an object in vb net?

6462


What is the difference between static or dynamic assemblies?

563


Explain the difference between c# and vb.net?

555






What is the exact defination of object?

579


How can we store decimal data in .net?

548


What is the top .net class that everything is derived from?

618


Why do we use ansi keyword?

572


Explain the difference between thread and process?

515


What is the source code for display the picture in button click event?

710


What do you mean by serialization?

541


Explain the advantages of vb.net?

529


i have two class that contain's two methods as same name in derived class i have to call these two methods what will happen at run time ?

2244


I Am Developing A project where I can send Message from One Computer to Another Computer With The Help Of LAN.Already I Have developed..It is working Fine With The Details Of ..TO,FROM,REF No,DATE,BODY...Now I Want To Add Attachments part in the same projects...How Can I Send Attachment File & How To Send It..I Am Working in VB.Net 2005 With out Any database. Can Any One Help me ??How To Write Code??Plz Send me a copy to my Mail also...I Dont Need Any Software Available in The Internet...Plz refer me The Code in VB.Net maloy.adhikari@in.com

2212