Skip to content

Latest commit

 

History

History
40 lines (33 loc) · 863 Bytes

cs1025.md

File metadata and controls

40 lines (33 loc) · 863 Bytes
description title ms.date f1_keywords helpviewer_keywords ms.assetid
Compiler Error CS1025
Compiler Error CS1025
07/20/2015
CS1025
CS1025
491c186f-cb40-47a9-9656-44fadfa18ae2

Compiler Error CS1025

Single-line comment or end-of-line expected

A line with a preprocessor directive cannot have a multiline comment.

The following sample generates CS1025:

#if true /* hello  
*/   // CS1025  
#endif   // this is a good comment  

CS1025 could also occur if you attempt some invalid preprocessor directive, as follows:

// CS1025.cs  
#define a  
  
class Sample  
{  
   static void Main()  
   {  
      #if a 1   // CS1025, invalid syntax  
         System.Console.WriteLine("Hello, World!");  
      #endif  
   }  
}