October 2022
Intermediate to advanced
258 pages
6h 5m
English
Start with the interactive documentation for Hello World in the browser.
Next up, try out GitHub Codespaces and the Visual Studio Code tutorial.
First, create a new Console App from the CLI and name it HelloWorld:
dotnetnewconsole-nHelloWorld
This step creates a console project. Next, change the code in Program.cs to the following example:
usingSystem;namespaceHelloWorld{classProgram{staticvoidMain(string[]args){Console.WriteLine("Hello World C# on AWS!");}}}
Next, cd into the directory (cd HelloWorld) and run the code dotnet run. The output of the command will be the following:
Hello World C# on AWS!
Create a new F# Console App:
dotnetnewconsole-lang"F#"-nFSharpHelloWorld
Change the code to the following:
openSystem// Define a function to construct a message to printletfromwhom=sprintf"from %s"whom[<EntryPoint>]letmainargv=letmessage=from"F# on AWS"// Call the functionprintfn"Hello world %s"message0// return an integer exit code
Next, cd into the directory (cd FSharpHelloWorld) and run it with dotnet run.
The output will be the following: Hello world from F# on AWS.
You can watch a walk-through of this process on the O’Reilly platform or YouTube.
Read now
Unlock full access