.cs C# source code
Text & source code
| MIME type | text/x-csharp |
|---|---|
| Description | C# source code |
| Category | Text & source code |
| Based on | text/x-csrc |
Frequently asked questions
What is a .cs file?
A .cs file is a “C# source code” (MIME type text/x-csharp).
How do I open a .cs file?
With any text editor – Notepad++, Visual Studio Code, or gedit and vim on Linux. The file contains readable text, possibly source code or configuration.
How can you tell a genuine .cs file?
No fixed signature at the start of the file is registered for this format; it is recognised mainly by its extension. On Linux and macOS, file --mime-type example.cs shows the guessed type.
Which format is .cs based on?
Technically a .cs file is a subtype of “C source code” (text/x-csrc), so programs for that base format can often read it too.
Which MIME type belongs to .cs?
The MIME type is text/x-csharp. In the Apache web server: AddType text/x-csharp .cs; in nginx: types { text/x-csharp cs; }.