Pattern for naming CLS compatible alternative Properties

孤街醉人 提交于 2020-01-04 08:11:55

问题


If i have a property like this

[CLSCompliant(false)]
public uint Something { ... }

and want to write an alternative, i can not just write an overload as i would do for methods. But how should i name it? Is there some general way in the .NET libs?

public long SomethingAlternative { ... }

回答1:


I would suggest SomethingAsInt64 to explicitly indicate the behavioural difference.




回答2:


Maybe do it the reverse way: make the complaint version "something" and the non-compliant as "SomethingUnsigned"




回答3:


SomethingCompliant meaning that it is compliant?



来源:https://stackoverflow.com/questions/5514855/pattern-for-naming-cls-compatible-alternative-properties

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!