diff -U 2 -Nr doxygen.old/src/docparser.cpp doxygen/src/docparser.cpp
--- doxygen.old/src/docparser.cpp	2010-05-07 21:37:33.000000000 +0200
+++ doxygen/src/docparser.cpp	2010-05-26 13:20:04.120750800 +0200
@@ -4982,5 +4982,5 @@
       break;
     case HTML_CODE:
-      if (g_fileName.right(3)==".cs") 
+      if (getLanguageFromFileName(g_fileName)==SrcLangExt_CSharp) 
         // for C# code we treat <code> as an XML tag
       {
diff -U 2 -Nr doxygen.old/src/filedef.cpp doxygen/src/filedef.cpp
--- doxygen.old/src/filedef.cpp	2010-05-07 21:37:33.000000000 +0200
+++ doxygen/src/filedef.cpp	2010-05-26 14:06:48.519836700 +0200
@@ -94,5 +94,5 @@
   }
   m_isJava          = name().right(5)==".java";
-  m_isCSharp        = name().right(5)==".cs";
+  m_isCSharp        = getLanguageFromFileName(name())==SrcLangExt_CSharp;
   memberGroupSDict = 0;
   acquireFileVersion();
diff -U 2 -Nr doxygen.old/src/pre.l doxygen/src/pre.l
--- doxygen.old/src/pre.l	2010-05-07 21:37:33.000000000 +0200
+++ doxygen/src/pre.l	2010-05-26 13:18:48.233772800 +0200
@@ -132,5 +132,5 @@
   //    name,g_yyFileName.data(),g_yyFileDef);
   if (g_yyFileDef && g_yyFileDef->isReference()) g_yyFileDef=0;
-  g_insideCS = g_yyFileName.right(3)==".cs";
+  g_insideCS = getLanguageFromFileName(g_yyFileName)==SrcLangExt_CSharp;
 }
 
