Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
This refactoring applies to:
C#
Visual Basic
What: Convert an anonymous type to class.
When: You have an anonymous type that you want to continue to build on in a class.
Why: Anonymous types are useful if you're only using them locally. As your code grows, it's nice to have an easy way to promote them to a class.
How-to
Place your cursor in an anonymous type.
Press Ctrl+. to trigger the Quick Actions and Refactorings menu.
Press Enter to accept the refactoring.