Search code examples
c#commanagedidl

Interface declaration location in IDL files


I'm working on a project that's upgrading a (very) old (and considerably large) program written extensively with COM / MFC to using WPF / managed .NET components, and part of it is trying to port over old COM interfaces declared in IDLs to managed C# interfaces. What's the difference between interfaces declared inside and outside 'library' blocks ?


Solution

  • There isn't one. Declaring an interface inside library {} just ensures it is present in the type library even if it isn't referenced by any coclasses. Nothing that matters to your C# declarations.