A Tour of G#
Welcome to a quick tour of G#. Like the Go Tour, this section is meant to be read in order. Each chapter introduces one small part of the language with short examples drawn from the repository's checked-in samples.
G# combines Go-inspired syntax with the .NET runtime. You will see packages, imports, func, top-level statements, structs, slices, maps, channels, go, select, and direct calls into CLR libraries.
Chapters
- Basics — variables, constants, functions, printing, and primitive types.
- Types and values — structs, data structs, records, classes, arrays, slices, maps, and zero values.
- Control flow —
if,switch,for,for in, and pattern matching. - Concurrency —
go,scope, channels, andselect. - .NET interop — imports, CLR types, extension functions, LINQ, and events.
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.