Module Module1 Sub Main() Dim result As Integer Dim x, y As Integer Console.WriteLine("ByVal") Console.Write("Enter Original value1:") x = CInt(Console.ReadLine) Console.Write("Enter Original value2:") y = CInt(Console.ReadLine) Console.WriteLine() result = sum2values(x, y) 'calling the function with 2 parameters Console.WriteLine("Result=" & result) Console.WriteLine() Console.WriteLine("Now Values of x=" & x & " and y=" & y) Console.WriteLine() Console.WriteLine("x and y are Unchanged") Console.ReadLine() End Sub 'defining a function with 2 parameters Function sum2values(ByVal x, ByVal y) 'modifying values of x and y Console.Write("Enter New value1:") x = CInt(Console.ReadLine) Console.Write("Enter New value2:") y = CInt(Console.ReadLine) sum2values = x + y End Function End Module
Visual Basic dot net VB.net programming microsoft .net framework object oriented language network enabled technology visual basic 2005 IDE integrated development environment console application microsoft cre common runtime environment
ByVal Calling
Subscribe to:
Post Comments (Atom)
The best casinos to play at the table poker
ReplyDeleteWhen you are playing 인천광역 출장마사지 for a while, you should 김포 출장마사지 be aware that playing the table poker is 경주 출장안마 much easier than just playing on the real money 과천 출장샵 poker tables. 당진 출장샵 You can