1.切换OOM模型
2.选择菜单Language-->Edit Current Object Language
3.修改Profile/Attribute/Templates/definition为下面第一代码即可
.if (%isValidAttribute%)
[%comment%/n]/
[%customAttributes%/n]/
[%oidDocTag%/n]/
.if (%Multiple% == 1) and (%isIndexer% == false)
private %dataType% _%fieldCode%[ = %InitialValue%];
[%visibility% ][%flags% ]%dataType% %fieldCode%
{
get
{
return _%fieldCode%;
}
set
{
_%fieldCode% = value;
}
}
.else
private %dataType%[%arraySize%] _%fieldCode%[ = %InitialValue%];
[%visibility% ][%flags% ]%dataType%[%arraySize%] %fieldCode%
{
get
{
return _%fieldCode%;
}
set
{
_%fieldCode% = value;
}
}
.endif
.endif
PS:
此代码是针对12.5进行编写,相关的变量标签(%%中的变量)的名称在不同版本中有点出入,所以建议在修改定义之前最好备份原来的定义代码,方便出错后,修改相关的变量名字就可以了 ^_^