Three slashes (///) usually mean one of two things: a C# documentation comment or a what3words location identifier.
Quick fix? In code, hit Ctrl + / (Windows) or Cmd + / (Mac) at the start of the line. In a URL or address field, it’s probably a separator—check for three-word location identifiers like what3words.
What’s Going On Here?
In C# and .NET, three slashes start XML documentation comments that help generate help files and IntelliSense tooltips.
Outside code, three slashes can mark a what3words address—a system that splits the world into 3m x 3m squares, each labeled with three words. Rarely, you might see them in URLs or legacy systems, but that’s not the norm.
How Do I Fix or Add These Comments?
In Visual Studio 2022 (or later), type /// above a class, method, or property to auto-generate XML documentation.
Here’s how to make it work:
- Open your C# project in Visual Studio 2022 (Version 17.8 or newer). Find the file where you want to add docs.
- Hover over a class, method, or property. Type
/// and hit Enter. Visual Studio builds a template with <summary> and <returns> tags.
- Fill in the blanks. For example:
<summary>
Gets the full name of the user.
</summary>
<returns>
A string with the first and last name.
</returns>
- Save the file. Now your IDE tooltips and generated docs will show this text when you hover.
For what3words addresses:
- Go to map.what3words.com.
- Paste the three-word address (e.g.,
///house.bench.lamp).
- If it’s valid, the map zooms to that exact spot. If not, you’ll get an error.
Why Didn’t This Work?
If the slashes aren’t recognized as comments, you’re probably not in a C# file or Visual Studio isn’t set up right.
First, double-check you’re editing a .cs file—JavaScript and Python use different comment styles. Then, in Visual Studio, go to Tools > Options > Text Editor > C# > Advanced and make sure “Generate XML documentation comments for ///” is turned on.
For what3words:
- Look for typos—what3words uses periods, not spaces (e.g.,
house.bench.lamp).
- Some apps add the
/// for you, so try including it if it’s missing.
- Run the address through the what3words validator to catch swapped words or wrong separators.
In URLs or plain text:
- If you see
/// in a URL, it’s likely a typo—most servers read https://example.com, not https:///example.com.
- In text files, triple slashes are usually mistakes. Swap them for spaces or a single slash if you’re using them as separators.
How Can I Avoid Issues Later?
Developers should stick to triple-slash comments in C# and set up tools like CodeLens and Git hooks to keep docs consistent.
For developers:
- Turn on CodeLens (under Tools > Options > Text Editor > All Languages > CodeLens) to preview docs inline.
- Use Git pre-commit hooks to flag public methods missing documentation.
For non-developers sharing what3words addresses:
- Stick to three words separated by periods (e.g.,
house.bench.lamp).
- Skip extra slashes—the system expects exactly three words, no more.
- Always verify the address on the official map before sending it.
For general text editing:
- Use Find and Replace (Ctrl+H) to clean up extra slashes. Search for
/// and swap it for a space or the separator you need.
Edited and fact-checked by the TechFactsHub editorial team.