A Tour of G#
Welcome to a quick tour of G#. Each chapter introduces one small part of the language with short, compiler-checked examples.
G# is a modern .NET language with Go-, Kotlin-, and Swift-style ergonomics. You will see packages, imports, func, structs, classes, arrays, slices, maps, collection initializers, nullable flow, structured concurrency with scope, and direct calls into CLR libraries.
Chapters
- Basics — variables, constants, functions, printing, primitive types, and
??. - Types and values — structs, data structs, data classes, classes, arrays, slices, maps, collection initializers, and anonymous objects.
- Control flow —
if,switch,for,while,if let/guard let, ranges, throw expressions,++/--, labels, andgoto. - Concurrency —
scope,async/await, andasync sequence[T]. - .NET interop — imports, CLR types, static imports, aliases, extension functions, LINQ, events, native interop, and unsafe pointers.
If you have not installed the tools yet, start with Install G#. If you want the shortest possible first program, use Quickstart: Hello, G#.
Next: Tour: Basics.