using a Code Snippet for INotifyPropertyChanged

前端 未结 5 603
再見小時候
再見小時候 2020-12-17 23:46

I found this code snippet for INotifyPropertyChanged

But it shows the code like this :

\"INotifyProperty

5条回答
  •  没有蜡笔的小新
    2020-12-18 00:38

    Unfortunately, this is not possible using code snippets.

    What you require would have to transform $property$ or some other literal. Even if you split the property name into 2 parts (first letter and the rest), you would have to make the letter upper case (or the other way - lower case).

    Snippets offer only very limited number of transformation functions - precisely 3 for C# and not one of them can give the required result. See Code Snippet Functions on MSDN. This is true for all versions of Visual Studio up to 2013.

提交回复
热议问题