Mega Code Archive

 
Categories / VB.Net Tutorial / Class Module
 

Define function and call it in a Module

Module Module1     Sub ShowBookInformation()         Console.WriteLine("A")         Console.WriteLine("B")         Console.WriteLine("C")         Console.WriteLine("D")     End Sub     Sub GreetInEnglish()         Console.WriteLine("Hello, world")     End Sub     Sub GreetInSpanish()         Console.WriteLine("Hola, mundo")     End Sub     Sub ShowTime()         Console.WriteLine("Current time is: " & Now)     End Sub     Sub Main()         ShowTime()         GreetInEnglish()         GreetInSpanish()         ShowBookInformation()     End Sub End Module Current time is: 11/05/2007 9:29:38 PM Hello, world Hola, mundo A B C D