How do I comment a publicly visible type Enum?

Like this: /// <summary> /// Conditional statements /// </summary> public enum ConditionType { ///<summary>A == B</summary> Equal, ///<summary>A != B</summary> NotEqual, ///<summary>A > B</summary> GreaterThan, ///<summary>A >= B</summary> GreaterThanOrEqual, ///<summary>A < B</summary> LessThan, ///<summary>A <= B</summary> LessThanOrEqual } (Yes, this can get very tedious) You may want to use different texts in the comments. By …

Read more

How can I add a comment (for developers, not in output HTML) to an Angular template?

Angular doesn’t have template comment support built in. You could, however, create a comment directive to support it, like this. app.directive(‘templateComment’, function () { return { restrict: ‘E’, compile: function (tElement, attrs) { tElement.remove(); } }; }); Markup would then be: <template-comment>Put your comment here.</template-comment> Alternately, you could use standard html comments, and then strip …

Read more

Does the C preprocessor strip comments or expand macros first? [duplicate]

Unfortunately, the original ANSI C Specification specifically excludes any Preprocessor features in section 4 (“This specification describes only the C language. It makes no provision for either the library or the preprocessor.”). The C99 specification handles this explicity, though. The comments are replaced with a single space in the “translation phase”, which happens prior to …

Read more

IDE comment keywords

I can speak of Eclipse, you can customize it. Click on Window -> Preferences, and search for General -> Editors -> Structured Text Editors -> Task tags, or for Java -> Compiler -> Task tags (there might be some additional ones like for JavaScript, PHP, StatET, etc.) TODO, FIXME, XXX I use some additional ones …

Read more