Reorder properties in new object - c#
Completed
Hello there,
I have been using resharper for many years. Just used standard functionalities.
I would like to hear if it is possible to sort properties alphabetically in a object when doing a "Code Cleanup"
return new Model {
Description = dto.Description,
Id = dto.Id,
Name = dto.Name,
Identifier = dto.Identifier
}
Please sign in to leave a comment.
I would like this after "Code Cleanup"
return new Model {
Description = dto.Description,
Id = dto.Id,
Identifier = dto.Identifier,
Name = dto.Name
}
Hello Lassebj,
Thank you for contacting us! This probably can be don using the File Layout feature. Could you share a full snippet / cs file for us to try suggest the certain settings?
Hello Andrey Simukov
Thank you for your response.
When I create a new object I would like "Code Cleanup" to sort the properties alphabetically. Hope my screenshot below explains what I mean.
Hello Lassebj
Currently there is no feature in ReSharper to sort properties this way. We have a similar feature request: https://youtrack.jetbrains.com/issue/RSRP-466798 Please feel free to comment and vote or just subscribe to the issue.
Ok Andrey Simukov 😊👍