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
What are the difference between dispose(), close(), exit(), end()? When do we use them?
Allowed program to auto-correct the database when loading a presentation.
Explain how does the xmlserializer work?
Explain about globalization?
What is the significance of delegates?
How to retrieve images in sql server database through vb.net?
What are the various open source tool available for VB.NET?
what is intermediate language?
Explain how the .net framework performs automatic memory management.
Can you please explain the difference between dataset and datareader?
What are the types of generations in garbage collector?
Explain nested classes?
Which dll is used for microsoft .net run time?
What are different types of jit ?
What is globalization?