Why can't I call an extension method as a static method when using static import?

谁说胖子不能爱 提交于 2019-11-28 01:06:15
Hamlet Hakobyan

Because of language design:

Using static makes extension methods declared in the specified type available for extension method lookup. However, the names of the extension methods are not imported into scope for unqualified reference in code.

using Directive

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