通过构建构造函数方式进行
- List item
public class Test
{
private readonly string _propA;
public string PropA => _propA;
public Test(string propA)
{
this._propA = propA;
}
public static Test SetMessage(string message)
{
return new Test(message);
}
}