Skip to main content
Version: 0.1

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

  1. Basics — variables, constants, functions, printing, and primitive types.
  2. Types and values — structs, data structs, records, classes, arrays, slices, maps, and zero values.
  3. Control flowif, switch, for, for in, and pattern matching.
  4. Concurrencygo, scope, channels, and select.
  5. .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.