Exercise
Function with parameters
Objetive
Write a Visual Basic (VB.Net) program whose Main must be like this:
public static void Main()
{
SayHello("John");
SayGoodbye();
}
SayHello and SayGoodbye are functions that you must define and that will be called from inside Main. As you can see in the example. SayHello must accept an string as a parameter.
Code
Imports System
Public Class Exercise98
Public Shared Sub SayHello(ByVal name As String)
Console.WriteLine("Hello" & name)
End Sub
Public Shared Sub SayGoodBye()
Console.WriteLine("Adios")
End Sub
Public Shared Sub Main(ByVal args As String())
SayHello("Jonh")
SayGoodBye()
End Sub
End Class