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
Can you please explain the difference between vb and vb.net?
Explain and brief about rapid application development tool?
What are the various open source tool available for VB.NET?
What are the different types of a stream?
Why do we use ansi keyword?
i am attending to US consulate i kept my projects on vb.net ,please help me what questions will be ask on vb.net in us consulate
What is the difference between c# and vb.net?
Name the class which allows an element to be accessed using unique key?
What is code access security?
Can you please explain the difference between dataset and datareader?
Explain how the .net framework performs automatic memory management.
List the different types of assembly?
What is the difference between readonly variable and constant variable?
How many ways the function can return values?
What is the difference between .dll extension and .exe extension files?