Is there a way to make readonly (not just private) automatic properties?

前端 未结 6 595
日久生厌
日久生厌 2020-12-31 13:02

Automatic properties let me replace this code:

private MyType myProperty;
public MyType MyProperty
{
    get { return myPropertyField; }
}

6条回答
提交回复
热议问题