模式命名CLS兼容替代属性属性、模式、CLS

由网友(南柯一梦天醉欢)分享简介:如果我有这样的属性。[CLSCompliant(假)]公共UINT东西{...}和想写一个选择,我不能只写过载,我会做的方法。但是我应该如何命名?有没有在.NET库的一些通用的方式?众长SomethingAlternative {...}解决方案 我会建议 SomethingAsInt64 明确表示行为的差异。If...

如果我有这样的属性。

  [CLSCompliant(假)]
公共UINT东西{...}
 

和想写一个选择,我不能只写过载,我会做的方法。 但是我应该如何命名?有没有在.NET库的一些通用的方式?

 众长SomethingAlternative {...}
 
如何将软件设置以兼容模式启动

解决方案

我会建议 SomethingAsInt64 明确表示行为的差异。

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 { ... }

解决方案

I would suggest SomethingAsInt64 to explicitly indicate the behavioural difference.

阅读全文

相关推荐

最新文章