Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

write a VB.net program to swap two numbers

Answer Posted / tarunkumar

vb.net programm to swap two numbers without using third
variable is as follows

public class form1
Private Sub Form1_Load(ByVal sender As System.Object, ByVal
e As System.EventArgs) Handles MyBase.Load
Dim a As integer
Dim b As integer
a=a+b
b=a-b
a=a-b
End Sub
End class

vb.net programm to swap two numbers using three variables
is as follows

public class form1
Private Sub Form1_Load(ByVal sender As System.Object, ByVal
e As System.EventArgs) Handles MyBase.Load
Dim a As integer
Dim b As integer
Dim temp As integer
temp=a
a=b
b=temp
End Sub
End class

this programm is written in window application because the
question tells to write vb.net programm only but not
console application

Is This Answer Correct ?    34 Yes 12 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is redim keyword?

940


Explain about visual basic.net?

1136


Explain about garbage collection?

945


What is the difference between custom control and user control?

944


What is the difference between import system.data.sqlclient and system.data.oledb?

881


What keyword is used to accept a variable number of parameter in a method?

978


Before in my vb app I would just load the icons from dll. How can I load the icons provided by .net dynamically?

924


What is the difference between value and reference types?

1003


Allowed program to auto-correct the database when loading a presentation.

2198


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 ?

2601


What are option strict and option explicit?

1309


Write program in VB.Net with SQL Server and Crystal Reports to develop a small windows application to add,edit,save, search and print Employee Information and send sourcecode as zip file. empcode : .............. empname : .............. dateofjoin : dd/mm/yyyy dateofbirth : dd/mm/yyyy TableName: EmpMaster EmpCode EmpName DOB DOJ TableName: EmpDocs EmpCode DocNo DocName ExpDate

2623


How to retrieve images in sql server database through vb.net?

924


Can you please explain the difference between value and reference types?

879


Explain and brief about rapid application development tool?

953