O'Reilly logo

C# in a Nutshell by Peter Drayton, Ted Neward, Ben Albahari

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Name

ComImportAttribute

Synopsis

This attribute indicates that the type decorated by this attribute is in fact an unmanaged type defined in a previously published type library, and should be treated differently internally to support that.

This attribute is necessary only if the .NET type definition—the class definition in C#—is merely a “shim” for interacting with the unmanaged version. In most cases, .NET programmers only use this type when interacting with existing COM APIs, such as when building Explorer Shell Extensions.

public sealed class ComImportAttribute : Attribute {
// Public Constructors
   public method ComImportAttribute();  
}

Hierarchy

System.ObjectSystem.AttributeComImportAttribute

Valid On

Class, Interface

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required