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
Explain the use of new keyword?
How a base class method is hidden?
Which control is an example of an object in vb net?
What is multiple form in vb?
What are the difference between structure and class?
What is meant by jagged arrays?
What are the difference between dispose(), close(), exit(), end()? When do we use them?
what is intermediate language?
How many languages are supported by .net?
difference between checkbox vs radiobutton??
Explain the difference between import system.data.sqlclient and system.data.oledb?
What is redim keyword and its use?
What is a literal control?
Is vb.net dead?
What is vb.net used for?