This is a migrated thread and some comments may be shown as answers.

Ordering Comments

1 Answer 21 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
MiddleTommy
Top achievements
Rank 1
MiddleTommy asked on 17 Jul 2010, 06:07 PM
When you have simple comments above a method or property it reorders those comments to the bottom of the class when ordering takes place.

public class Hello
{
    //this is the contructor
    public Hello(){}
}

//is reordered to
public class Hello
{
    public Hello(){}
    //this is the contructor
}

I think comments above a property, class or method that has no blank line between the comment and the code should not be reordered away from the code


1 Answer, 1 is accepted

Sort by
0
Deyan Varchev
Telerik team
answered on 19 Jul 2010, 05:01 PM
Hello Tommy,

Thanks for sharing your suggestion. Although it sounds logical, it will depend on the semantics of the comment whether it is for that particular method or not. Quite frequently developers comment-out large amounts of their source code (methods) and in those cases the code formatting will not work as expected. In general it is a good practice to use Doc comments (prefixed with /// in C# or ''' in VB.NET) instead of normal comments. This way, JustCode will know that the documentation is intentionally put in front of the method and will keep its correct position after formatting.

All the best,
Deyan
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
Tags
General Discussions
Asked by
MiddleTommy
Top achievements
Rank 1
Answers by
Deyan Varchev
Telerik team
Share this question
or