Using Enums that are in an external dll C#

Posted by user1443233 on Stack Overflow See other posts from Stack Overflow or by user1443233
Published on 2012-06-07T21:14:17Z Indexed on 2012/06/07 22:41 UTC
Read the original article Hit count: 211

Filed under:
|
|
|

I have a project I am working that will involve creating one DLL that will be used across multiple other sites. Inside this DLL we need to reference about 10 Enums. The values of these Enums however will be different for each site the DLL is used on. For example:

MyBase.dll may have a class MyClass with an attribute of type MyEnum.

MyBase.dll is then referenced in MySite. MyStie will also reference MyEnums.dll which will contain the values for the MyEnum type.

Is there any way to accomplish this? While building MyBase.dll, I know what enums will exist in side of MyEnums.dll. The problem is I cannot build MyBase.dll without specifically referenceing the MyEnums.dll, which is not created until the MyBase.dll is used in a specific project.

I hope that makes sense and hope I can find an answer here.

Thanks.

© Stack Overflow or respective owner

Related posts about c#

Related posts about reflection