Home
Insert
Update snippet 'Hello world (.NET)'
Title
Description
Classical "Hello world" example that prints a message to the console output. This version uses .NET Console.WriteLine method to do the printing.
Source code
// Open namespace with the 'Console' class open System // Declare a local value (inferred type is string) let world = "world" // Using '{0}' to print value of the first parameter Console.WriteLine("Hello {0}!", world)
Tags
console
writeline
hello world
let
namespace
console
writeline
hello world
let
namespace
Author
Link
Reference NuGet packages
If your snippet has external dependencies, enter the names of NuGet packages to reference, separated by a comma (
#r
directives are not required).
Update