Loading ...

Resharper: Change CLR types to built-in C# type aliases | CodeAsp.Net

ReSharper: Change CLR types to built-in C# type aliases

 /5
0 (0votes)

If you are using ReSharper and want to change CLR types to built-in C# type aliases (i.e. Int32 to int, String to string etc.) in an existing file, this blog will help you. I am writing the steps which will help you to change CLR types to built-in C# type aliases

  1. Install StyleCop for Resharper


  2. After installing it open VisualStudio and go to Resharper >> Options



  3. Go to "Code editing" >> "Code cleanup". Add a new profile say "StyleCop" and select "Use Built In Type Alias" checkbox.

  4. Click the "Save" button.
  5. Now go to your file where you want to perform the action. Run "Clean up code" ( CTRL+ ALT+ F) and then run the "StyleCop" profile.



    You will see the CLR types changed to built-in C# type aliases after "clean up".

Comments (no comments yet)

Top Posts