I find that I am creating many properties from a pattern:
private readonly MyType sth;
public MyClass(MyType sth)
{
this.sth = sth;
}
public MyType Sth
{
get { return sth; }
}
Is there an easy way to automate the creation of these properties? Usually I:
- enter field including readonly keyword
- Select "initialize constructor options
- Choose Encapsulate
Is it possible to do it faster?
source
share