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
Name the two main parts of .net?
What is the use of internal keyword?
What are the objects in asp.net?
Explain code security?
Did vb6 support multi-threading ?
Name some of the features present in vb 2005?
Describe about visual basic.net?
Explain about rapid application development tool?
Explain i.tostring method?
What does assert() method do In VB.NET
What is the difference between static or dynamic assemblies?
What is misl code?
What is the difference between import system.data.sqlclient and system.data.oledb?
Explain the difference between .dll extension and .exe extension files?
Can you please explain the difference between int and int32?