Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
Export (0) Print
Expand All

Imported Module Conversion

A type library can have one or more modules containing the definitions of constants and methods. Constants defined within modules are imported as public constant static members of a class with the same name as the original module. Constants defined outside of a module are not imported.

Type library representation

library TestConstants
    module Constants
        const short FRAME_COLOR = 0x10;
        const short WINDOW_COLOR = 0x20;
        const short BUTTON_COLOR = 0x40;

Converted types appear as follows:

Public Class Constants
    Public Const FRAME_COLOR As Short = &H10
    Public Const WINDOW_COLOR As Short = &H20
    Public Const BUTTON_COLOR As Short = &H40
End Class
public class Constants
    public const short FRAME_COLOR = 0x10;
    public const short WINDOW_COLOR = 0x20;
    public const short BUTTON_COLOR = 0x40;

See Also

Type Library to Assembly Conversion Summary | Imported Library Conversion | Imported Type Conversion | Imported Member Conversion | Imported Parameter Conversion

© 2015 Microsoft