Skip to main content
A newer version of this page is available. .

Smart Dot

Smart Dot allows you to write function call chains faster with fewer keystrokes. For example, "myStr.ToUpper().Trim()".

This feature works in C#, Visual Basic, JavaScript, TypeScript, and Blazor code.

How to Use

  • Place the caret in a parameterless function call.

  • Type the dot (.) within empty parentheses.

CodeRush places the dot and the caret to the right of the closing parentheses allowing you to call another method in a call chain.

DotToRight

If you have a complete method call and want to call another method in a call chain on the same line, type the dot at the end of the line (right after the final semicolon).

CodeRush places the dot and the caret to the left of the semicolon. This allows you to create method call chains.

DotToLeft

How to Enable

To enable Smart Dot, do the following:

  • Select CodeRush\Options... from the Visual Studio menu to open the options page.

    Open

  • Enable the corresponding option in the Editor | {Language} | Smart Keys options page.

    Enable

Blazor Support

The Smart Dot is available from the code sections in .razor files.

Blazor