Getting Started with .NET Languages
Welcome! This guide introduces the three primary languages supported by the .NET platform: C#, F#, and VB.NET. Each section provides a quick hello‑world example and links to deeper resources.
C# (C Sharp)
C# is a modern, object‑oriented language designed for building a wide range of applications.
Hello World in C#
// HelloWorld.cs
using System;
class Program
{
static void Main()
{
Console.WriteLine("Hello, .NET!");
}
}
Compile and run:
dotnet new console -n HelloWorld
cd HelloWorld
dotnet run
Learn more: C# Basics
F# (Functional-first)
F# combines functional, imperative, and object‑oriented programming paradigms.
Hello World in F#
// HelloWorld.fs
printfn "Hello, .NET!"
Run the script:
dotnet fsi HelloWorld.fs
Learn more: F# Intro
VB.NET (Visual Basic)
VB.NET is a language with a long heritage, known for its easy‑to‑read syntax.
Hello World in VB.NET
' HelloWorld.vb
Module Program
Sub Main()
Console.WriteLine("Hello, .NET!")
End Sub
End Module
Compile and run:
vbnc HelloWorld.vb
mono HelloWorld.exe
Learn more: VB.NET Intro