网上找的几个模板都不太适用,通过自己几次尝试后,改了这个版本,最后效果满意。省了很多工作量,牛X
.if (%isGenerated%) and (%isValidAttribute%)
private [%flags% ]%dataType%[%arraySize%] _%fieldCode%[ = %InitialValue%];
/// <summary>
[%comment%\n]\
[%oidDocTag%\n]\
[%customAttributes%\n]\
/// </summary>
[%visibility% ][%flags% ]%dataType%
.convert_name(%fieldCode%,,"_")
{
get { return %fieldCode%; }
set { %fieldCode% = value; }
}
.endif
参考文章
https://blog.csdn.net/da454122373/article/details/54346217