I was just reading through the MethodInfo type and came across this type 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
许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top