public int MyProperty { get; set; }
VisualStudio輸入propfull再TAB鍵產生以下程式碼
private int myVar;
public int MyProperty
{
get { return myVar; }
set { myVar = value; }
}
https://docs.microsoft.com/en-us/visualstudio/ide/visual-csharp-code-snippets?view=vs-2019
https://www.dotnetperls.com/snippet
沒有留言:
張貼留言