添加链接
link管理
链接快照平台
  • 输入网页链接,自动生成快照
  • 标签化管理网页链接

ReSharper 2024.1 Help

Typing assistance

In addition to saving your time by providing smart suggestions in completion lists , ReSharper provides other typing assistance features, which let you create and edit your code even faster.

Auto-Insert matching delimiters

By default, whenever you type an opening delimiter ( , [ , " , or ' , a paired character is inserted automatically (whenever appropriate). If you change your mind and press Backspace to delete an opening delimiter, its closing pair is also deleted. If the matching closing delimiter already exists, ReSharper will not add another one. The matching symbols are inserted according to your formatting preferences .

Regarding braces {} , ReSharper can provide a closing brace immediately on typing the opening one, or on pressing Enter .

If necessary, you can change the default behavior. To do so, go to the Environment | Editor | Behavior page of ReSharper options Alt+R, O and use the controls in the Braces and Parentheses section.

Correct Length/Count mistyping

ReSharper prevents you from stumbling over mistyped Length / Count properties of arrays/collections. As soon as you erroneously start typing the Count property for a usage of an array, ReSharper will allow you to pick it from the completion list and replace with the Length property, which you probably meant to type.

Completing mistyped Count property for array

In a similar way, it will help you call the Count property on a collection usage when you start typing the Length property by mistake.

Completing mistyped Length property for collection

The correct property will be there as soon as you accept the completion suggestion:

void Foo(int[] array, List<int> collection) if(array.Length == collection.Count