> For the complete documentation index, see [llms.txt](https://ss3d.gitbook.io/dev-guide/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://ss3d.gitbook.io/dev-guide/guidelines/the-c-style-guide.md).

# The C# Style Guide

This style guide is based on [this other C# style guide](https://github.com/raywenderlich/c-sharp-style-guide/blob/master/README.markdown) and expands upon it.

You can use whatever file editor you want, but [Visual Studio](https://code.visualstudio.com/) is probably the most popular and recommended choice. It's free, has many features, and integrates well with Unity and Git.&#x20;

If you're a student, we recommend getting a copy of [JetBrain's Rider](https://www.jetbrains.com/rider/) which adds a lot of code hints and shortcuts that will significantly improve your code quality.

Our overarching goals are **clarity**, **readability** and **simplicity**. Also, this guide is written to keep **Unity** in mind.

### Inspiration

This style guide is based on C# and Unity conventions, and discussions within the development team.

### Automation

We recently added an [EditorConfig](https://editorconfig.org/) file to automate the code review process, it is a file you can add to [Visual Studio](https://learn.microsoft.com/en-us/visualstudio/ide/create-portable-custom-editor-options?view=vs-2022) or [Rider](https://www.jetbrains.com/help/idea/editorconfig.html) and it will apply the formatting and style we use to your analyzers, telling you when something is out of order.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://ss3d.gitbook.io/dev-guide/guidelines/the-c-style-guide.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
