问题描述
根据对<$c$c>StringComparer.OrdinalIgnoreCase$c$c>属性:
在OrdinalIgnoreCase属性返回从 StringComparer 类。
这是一个功能,我不熟悉,匿名类型继承?或者通过匿名类也撰文只是意味着内部类派生从 StringComparer
,不可见的客户端code?
Is this a feature I'm unfamiliar with—anonymous types with inheritance? Or by "anonymous class" did the author simply mean "internal class deriving from StringComparer
, not visible to client code"?
推荐答案
如果你看一下源$ C $下StringComparer,你可以看到,OrginalIgnoreCase返回OrdinalComparer,这是从StringComparer派生的一个实例。
If you look at the source code for StringComparer, you can see that OrginalIgnoreCase returns an instance of OrdinalComparer, which is derived from StringComparer.
没有什么匿名关于这个,我可以看到,它只是它的的内部的,所以你不能从框架之外看到它。
There's nothing 'anonymous' about this that I can see, it's just that it's internal so you can't see it from outside the framework.
这篇关于匿名类型可以从另一个类型继承?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!