Back to Devexpress

Convert to System Type/Built-In Type

coderushforroslyn-116887-refactoring-assistance-convert-to-system-type-built-in-type.md

latest1.2 KB
Original Source

Convert to System Type/Built-In Type

  • Dec 13, 2021

Purpose

This refactoring enables you to switch between the .NET Framework type names and their keyword aliases.

Availability

Available when the caret is in a type reference.

Usage

  1. Place the caret in a type reference.

  2. Press the Ctrl + . or Ctrl + ~ shortcut to invoke the Code Actions menu.

  3. Select Convert to System Type from the menu ( Convert to Built-In Type if you need to use a language-specific type).

After execution, the refactoring switches the CLR type to its keyword alias or vice versa.

csharp
Int32 ID;
vb
Dim ID As Int32

Note

You can also apply the “Apply built-in type style” rule in code cleanup. See the following topic for more information: Configure Cleanup.

See Also

Make Implicit/Explicit

Make Read-Only