File Layout - match class name with file name

Completed

Hi, 

is it possible to match the file name with the class name?

E.g.

 

Thanks in advance

0
3 comments

Hello knp,

Thank you for contacting us.
At this moment, ReSharper doesn't provide the feature of matching file names with the class names.
Could you please describe in detail what result you'd like to achieve with this pattern?

0

Hi,

I have files with multiple classes in it. I want to reorder the classes by name and additionally set the class with the same name as the file always on top of all other classes.

Example:

Content of file 'B.cs': 

namespace Test.Project
{
public class A {...}
public class B {...}
public class C {...}
}

What I expect after file layout has been applied:

namespace Test.Project
{
public class B {...}

#region Related Classes
public class A {...}
public class C {...}
#endregion
}
1

Hello knp,

Thank you for the additional information.
I've discussed this feature request with our development team and opened a corresponding issue - https://youtrack.jetbrains.com/issue/RSRP-485254
Feel free to comment or vote for it.
Let me know if you have any questions.

0

Please sign in to leave a comment.