-
Notifications
You must be signed in to change notification settings - Fork 4.2k
Closed
Labels
Area-IDEDeveloper CommunityThe issue was originally reported on https://developercommunity.visualstudio.comThe issue was originally reported on https://developercommunity.visualstudio.comFeature RequestIDE-CodeStyleBuilt-in analyzers, fixes, and refactoringsBuilt-in analyzers, fixes, and refactoringshelp wantedThe issue is "up for grabs" - add a comment if you are interested in working on itThe issue is "up for grabs" - add a comment if you are interested in working on it
Milestone
Description
This issue has been moved from a ticket on Developer Community.
There are several things that happen over and over again in programming. One of them is implementing foreach loops for variables.
Consider the following:
string[] names = new string[] {"John", "Peter", "Dan"};
names // press CTRL+. on `names` variable
at this point I would love to have an option in the context menu that would implement:
string[] names = new string[] {"John", "Peter", "Dan"};
foreach (string name in names) {
// caret here
}
PS: I know I can write foreach and press tabulator twice and it helps but it still requires quite a lot of manual work to get it to required code.
Thank you for considering this feature.
Original Comments
Feedback Bot on 3/21/2022, 07:33 AM:
(private comment, text removed)
yahiheb, kiminuo and DoctorKrolic
Metadata
Metadata
Assignees
Labels
Area-IDEDeveloper CommunityThe issue was originally reported on https://developercommunity.visualstudio.comThe issue was originally reported on https://developercommunity.visualstudio.comFeature RequestIDE-CodeStyleBuilt-in analyzers, fixes, and refactoringsBuilt-in analyzers, fixes, and refactoringshelp wantedThe issue is "up for grabs" - add a comment if you are interested in working on itThe issue is "up for grabs" - add a comment if you are interested in working on it
Type
Projects
Status
Complete