Visual Studio Syntax Highlighting for C# Files | CodeGuru

Visual Studio Syntax Highlighting for C# Files

Environment: Visual Studio and C# Here are the instructions necessary to have Visual Studio syntax-highlight your C# files. Locate the following key in your registry (using regedit or any other registry editor): HKEY_CURRENT_USER\Software\Microsoft\DevStudio\6.0\Text Editor\Tabs/Language Settings\C/C++\FileExtensions This value will contain a value like the following: cpp;cxx;c;h;hxx;hpp;inl;tlh;tli;rc;rc2 Simply add the .cs extension to the end as in […]

Written By
CodeGuru Staff
CodeGuru Staff
Oct 3, 2000
1 minute read
CodeGuru content and product recommendations are editorially independent. We may make money when you click on links to our partners. Learn More

Environment: Visual Studio and C#

Here are the instructions necessary to have Visual Studio syntax-highlight your C# files.

  1. Locate the following key in your registry (using regedit or any other registry editor):

    HKEY_CURRENT_USER\Software\Microsoft\DevStudio\6.0\Text Editor\Tabs/Language Settings\C/C++\FileExtensions

    This value will contain a value like the following:

    cpp;cxx;c;h;hxx;hpp;inl;tlh;tli;rc;rc2

    Simply add the .cs extension to the end as in this example:

    cpp;cxx;c;h;hxx;hpp;inl;tlh;tli;rc;rc2;cs

  2. Download the usertype.dat file (at the bottom of this document)
    and copy it to the same directory as msdev.exe
    (Visual Studio editor) (By default this will be
    c:\program files\microsoft visual studio\common\msdev98\bin). This file contains all the C# keywords

Downloads

Download (zipped) usertype.dat file (containing C# keywords) – 1 Kb

CodeGuru Logo

CodeGuru covers topics related to Microsoft-related software development, mobile development, database management, and web application programming. In addition to tutorials and how-tos that teach programmers how to code in Microsoft-related languages and frameworks like C# and .Net, we also publish articles on software development tools, the latest in developer news, and advice for project managers. Cloud services such as Microsoft Azure and database options including SQL Server and MSSQL are also frequently covered.

Property of TechnologyAdvice. © 2026 TechnologyAdvice. All Rights Reserved

Advertiser Disclosure: Some of the products that appear on this site are from companies from which TechnologyAdvice receives compensation. This compensation may impact how and where products appear on this site including, for example, the order in which they appear. TechnologyAdvice does not include all companies or all types of products available in the marketplace.