inline copies of enums

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Sergio Trejo

    #1

    inline copies of enums

    Is it possible to make an inline copy in CSharp? I want to maintain a
    single enumeration but make a copy of the members in a separate
    enumeration.

    I have an enumeration defined in a certain namespace:

    namespace Graphing.Core
    {
    public enum EnumColors
    {
    Red = 1,
    ...
    }
    }

    For organisational purposes I would like to introduce a separate
    namespace that includes all the types that are intended for
    interoperabilit y. In this namespace I need a "mirror" of my original
    enumeration but with a different name (to maintain our tlb naming
    conventions). The enumeration members are exactly the same:

    namespace GraphingInterop .Core
    {
    [System.Runtime. InteropServices .ComVisible(tru e)]
    public enum EnumGraphColors
    {
    Red = 1,
    ...
    }
    }

    I can not find any means in the language to achieve this unless we
    maintain two copies of the enumeration. Does anybody have any
    suggestions?
Working...