all groups > c# > july 2003 >
You're in the

c#

group:

C#( Is it possible to add the Enum in dynamically?)



Re: C#( Is it possible to add the Enum in dynamically?) Nicholas Paldino [.NET/C# MVP]
7/14/2003 1:46:40 PM
c#: Dev,

No, it is not. There would be no way for other developers to know how
to use it as it would not be available at dev time, or at compile time.

What are you trying to do?


--
- Nicholas Paldino [.NET/C# MVP]
- nicholas.paldino@exisconsulting.com

[quoted text, click to view]
Dear Friends,
Is it possible to add the Enum in
dynamically.
Like Ex:
enum Colors
{
Green, Red,Yellow,Blue,Orange
}
So i want add 6th name Black to Colors.Is it possible? If so how?...If
anyone knows please let me know....

Thanks,
Dev

Re: C#( Is it possible to add the Enum in dynamically?) chris NO[at]SPAM chornbe.com
7/14/2003 5:25:28 PM
You're looking to have runtime-configured data domains. To do that use
a custom data container class that wraps a Hashtable. Hashtables are
key-value type containers and the keys are unique so they lend
themselves nicely to this problem.


[quoted text, click to view]
C#( Is it possible to add the Enum in dynamically?) Dev
7/14/2003 10:55:17 PM
Dear Friends,
Is it possible to add the Enum in =
dynamically.
Like Ex:
enum Colors
{
Green, Red,Yellow,Blue,Orange
}
So i want add 6th name Black to Colors.Is it possible? If so how?...If =
anyone knows please let me know....

Thanks,
AddThis Social Bookmark Button