Autocompleting initializer with Resharper 6 in Visual Studio 2010

后端 未结 1 950
滥情空心
滥情空心 2021-02-13 00:51

I was wondering if there is any way to shortcut the process of object initialization with VS 2010 and Resharper (6). When presented with the yellow tool tip below I\'d like to h

1条回答
  •  孤独总比滥情好
    2021-02-13 01:09

    ReSharper code completion works exactly this way. As soon as you've typed in the braces, press Ctrl+Space to get the list of all properties:

    var data = new Data {|}
    

    Then, after entering a comma to delimit properties, ReSharper completion will only show properties that you haven't yet initialized. More importantly, when you complete a property name, it inserts the property and the equals sign.

    0 讨论(0)
提交回复
热议问题