dotnet / dotnet/roslynator

Refactor request: Convert comment to region, or vise versa

Open
#365 0 comments 0 reactions 1 assignee Claimed by @josefpihrt View on GitHub
Area-Refactorings Feature Request
Dominant language
C#
Stars
3.5k
Forks
294
Avg merge
2h 30m
Merged PRs (30d)
4

Description

Before refactor, select the following lines:
````C#
// randomize input
var a = Console.ReadKey();
x = a.KeyCode.ToNumber(randomSeed);
````
The Refactor changes the first line of the comment to Region text, and surround the selected code with a `#Region`.

````C#
#region randomize input
var a = Console.ReadKey();
x = a.KeyCode.ToNumber(randomSeed);
#endregion
````

A vise versa refactor change the above lines back to the original one.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.