So I made this and someone has submitted a new VB.NET hello world example:
Module m1
Sub Main()
Console.out.writeline("Hello World")
End Sub
End Module
Is this valid VB.NET? I don’t know the language, so wanted to check it.
The example that is currently on the website is:
Console.WriteLine ("Hello, World!")
What I’m mainly questioning is the Console.out.writeline – is this right?
Thanks in advance. 🙂
Yes, this is correct.
Console.WriteLineandConsole.Out.WriteLineare equivalent.The documentation for
Console.WriteLinesays: “Writes the specified string value, followed by the current line terminator, to the standard output stream.“The documentation for
Console.Outsays: “Gets the standard output stream.“Console.Outis a TextWriter which is used for outputting text to a stream. The documentation forTextWriter.WriteLinesays: “Writes a string followed by a line terminator to the text string or stream.“Console.WriteLineis basically just a shortcut forConsole.Out.WriteLine.