C# forward slash comments as last item in a method body

SyntaxEditor .NET Languages Add-on for Windows Forms Forum

Posted 1 month ago by YEVGENIY A GRIGORYEV
Version: 20.1.0403
Avatar

In some cases we load editors as follows:

------Header----------

public static class Test {

------------------------

public static void TestMethod() {

...... method body.......

------Footer------------

}}

--------------------------

In cases when method body happens to end with comment blocks starting from //, Intelliprompt red-underlines the end of the method body seemingly requiring additional }} in the method body, then it is satisfied. Removing trailing comment blocks also removes the red underline.

Could you please check if you can recreate this and possibly correct with the next release?

Thanks.

[Modified 1 month ago]

Comments (2)

Answer - Posted 1 month ago by Actipro Software Support - Cleveland, OH, USA
Avatar

Hello,

SyntxEditor simply combines the header, body, and footer text together.  My guess is that you didn't put a line terminator at the start of your footer text, so you effectively end up with this for the text to parse as your last line:

// }}

Whereas if you change your footer text to begin with a line terminator, your last lines would then be the following, which should work:

//
}}


Actipro Software Support

Posted 1 month ago by YEVGENIY A GRIGORYEV
Avatar

Thank you, this solved the problem.

The latest build of this product (v21.1.0) was released 16 days ago, which was after the last post in this thread.

Add Comment

Please log in to a validated account to post comments.