开发者

Pattern for naming CLS compatible alternative Properties

开发者 https://www.devze.com 2023-02-21 17:05 出处:网络
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.

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 { ... }
开发者_JS百科


I would suggest SomethingAsInt64 to explicitly indicate the behavioural difference.


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


SomethingCompliant meaning that it is compliant?

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号