Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

6. Fields

Fields are named variables declared inside a type body (such as a struct or class) that store data specific to instances of that type.

Fields declarations consist of optional modifier keywords, it's type, a unique name and optionally an assignment.

public i32 MyNumber = 16;