Reading the documentation with C# examples
The official documentation is written once and translated into several languages. If your browser is showing Visual Basic samples while you are learning C#, every example will look wrong. The fix takes ten seconds.
Set the language once
Open the documentation and look for the language selector, usually near the top right of a topic page. Choose C#. The documentation will remember the choice for later pages, so the samples stay in the language you picked.
Why this matters more than it sounds
- Sample code that matches your language can be pasted and tested immediately.
- Method names and punctuation differ between the languages, so mixed samples cause real errors.
- Consistency builds confidence when you are still learning the syntax.
When the samples still differ
Documentation ages. A topic may describe a newer version of a library than the one you have. If an example will not compile, check the version note at the top of the topic before you assume you made a mistake.
Once your documentation shows C#, you are ready to write your first program.