FIX: You receive an "Error CS1513" error message when you try to compile code that is generated by the Implement Interface Wizard in Visual Studio .NET (315740)
The information in this article applies to:
- Microsoft Visual Studio .NET (2002), Professional Edition
This article was previously published under Q315740 SYMPTOMS The code generated by the Implement Interface Wizard does
not compile correctly. Instead, you receive the following error message:
c:\my samples\q315740\class1.cs(37,2): error CS1513: }
expected CAUSE This behavior occurs only with a class that derives from an
interface and for which no methods or properties are implemented as
yet.
The Implement Interface code generator places the closing curly brace for the class in
the same line as the #endregion directive. The #region directive lets you specify a block of code that you can expand or
collapse when you use the outlining feature of the Visual Studio Code Editor.
RESOLUTION To resolve this issue, move the curly brace next to the #endregion directive.
NOTE: If a method or property were already implemented in your class,
you would not encounter this issue. STATUSMicrosoft has confirmed that this is a bug in the Microsoft
products that are listed at the beginning of this article.
This bug was corrected in Microsoft Visual
Studio .NET (2003), Professional Edition.
Modification Type: | Minor | Last Reviewed: | 8/24/2005 |
---|
Keywords: | kbvs2002sp1sweep kbfix kbbug kberrmsg kbnofix KB315740 |
---|
|