开发者

Why isn't _MethodInfo interface called IMethodInfo in .NET?

I was just reading through the MethodInfo type and came across this t开发者_如何学运维ype and thought it was some sort of unmanaged class of some sort at first. Then saw that it's actually an interface.

Anyone knows why it wasn't named IMethodInfo? I thought prefixing interfaces with I was standard practice in .NET. Is it because of some naming collision?


That's because it's a COM visible interface and that's a convention in COM:

[ComVisible(true), InterfaceType(ComInterfaceType.InterfaceIsIUnknown), TypeLibImportClass(typeof(MethodInfo)), Guid("FFCC1B5D-ECB8-38DD-9B01-3DC8ABC2AA5F"), CLSCompliant(false)]
public interface _MethodInfo
0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜