[Info] How I like to refactor code to a function in Visual Studio

Hey Guys,

for those guys who like to speed up things.

If you want create a function from existing code you can simply use in Visual Studio the ‘Quick Actions and Refactoring’ function (Ctrl + .). You may know it from including automaticly namespaces or headers.

If you mark your Text and then Right-Click (Ctrl + .) then you choose ‘Quick Actions and Refactoring’, then choose Extract Function and give the marked text you want to extract a function name.

Here are some pictures:

https://picload.org/image/rpadarwa/function.jpg

https://picload.org/image/rpadarwl/menu.jpg

https://picload.org/image/rpadarwi/find.jpg

Result:
https://picload.org/image/rpadaari/4.jpg

This function is may in developement, but worked all the time for me perfect.

Pretty cool right? :smiley:

Cheers

Privacy & Terms