Click here to Skip to main content
15,905,875 members
Home / Discussions / C#
   

C#

 
GeneralRe: Reference syntax Pin
kanchoette21-Jan-09 21:30
kanchoette21-Jan-09 21:30 
QuestionInserting XML file in SQL db Pin
KppsK21-Jan-09 3:46
KppsK21-Jan-09 3:46 
AnswerRe: Inserting XML file in SQL db Pin
DanB198321-Jan-09 5:45
DanB198321-Jan-09 5:45 
AnswerRe: Inserting XML file in SQL db Pin
Wendelius21-Jan-09 7:36
mentorWendelius21-Jan-09 7:36 
QuestionDynamic Enum Creation Pin
MamthaLalith21-Jan-09 3:07
MamthaLalith21-Jan-09 3:07 
AnswerRe: Dynamic Enum Creation Pin
#realJSOP21-Jan-09 3:09
professional#realJSOP21-Jan-09 3:09 
GeneralRe: Dynamic Enum Creation Pin
MamthaLalith21-Jan-09 3:19
MamthaLalith21-Jan-09 3:19 
GeneralRe: Dynamic Enum Creation Pin
Ben Fair21-Jan-09 3:34
Ben Fair21-Jan-09 3:34 
You can create code in memory at runtime and compile it into an in memory assembly. This can be done with the System.CodeDom and Microsoft.CSharp namespaces. You would then use reflection (System.Reflection) to interact with the assembly. I've seen articles that talk about scripting implementations that give examples of using the classes in the aforementioned namespaces. I've been able to dynamically compile text that is syntactically valid C# code into an in memory assembly and use reflection to execute the code and return a result. So, you should be able to use the same approach to create an Enum in an in memory assembly and then load an instance of the Enum from that assembly. There probably won't be code out there that does exactly what you are asking about, but there is stuff out there that will get you in the ballpark.

Keep It Simple Stupid! (KISS)

AnswerRe: Dynamic Enum Creation Pin
DaveyM6921-Jan-09 3:26
professionalDaveyM6921-Jan-09 3:26 
AnswerRe: Dynamic Enum Creation Pin
Dave Kreskowiak21-Jan-09 3:31
mveDave Kreskowiak21-Jan-09 3:31 
GeneralRe: Dynamic Enum Creation Pin
MamthaLalith21-Jan-09 3:41
MamthaLalith21-Jan-09 3:41 
GeneralRe: Dynamic Enum Creation Pin
Gideon Engelberth21-Jan-09 3:53
Gideon Engelberth21-Jan-09 3:53 
GeneralRe: Dynamic Enum Creation Pin
Dave Kreskowiak21-Jan-09 4:45
mveDave Kreskowiak21-Jan-09 4:45 
AnswerRe: Dynamic Enum Creation Pin
PIEBALDconsult21-Jan-09 5:24
mvePIEBALDconsult21-Jan-09 5:24 
GeneralRe: Dynamic Enum Creation Pin
Ennis Ray Lynch, Jr.21-Jan-09 6:07
Ennis Ray Lynch, Jr.21-Jan-09 6:07 
GeneralRe: Dynamic Enum Creation Pin
PIEBALDconsult21-Jan-09 6:58
mvePIEBALDconsult21-Jan-09 6:58 
GeneralRe: Dynamic Enum Creation Pin
Ennis Ray Lynch, Jr.21-Jan-09 7:10
Ennis Ray Lynch, Jr.21-Jan-09 7:10 
GeneralRe: Dynamic Enum Creation Pin
PIEBALDconsult21-Jan-09 7:15
mvePIEBALDconsult21-Jan-09 7:15 
GeneralRe: Dynamic Enum Creation Pin
Ennis Ray Lynch, Jr.21-Jan-09 7:16
Ennis Ray Lynch, Jr.21-Jan-09 7:16 
GeneralRe: Dynamic Enum Creation Pin
PIEBALDconsult21-Jan-09 7:50
mvePIEBALDconsult21-Jan-09 7:50 
QuestionDrawing only one rectangle, when i moving the mouse on a pictureBox Pin
tschmid8521-Jan-09 3:03
tschmid8521-Jan-09 3:03 
AnswerRe: Drawing only one rectangle, when i moving the mouse on a pictureBox Pin
DaveyM6921-Jan-09 3:39
professionalDaveyM6921-Jan-09 3:39 
AnswerRe: Drawing only one rectangle, when i moving the mouse on a pictureBox Pin
musefan21-Jan-09 5:15
musefan21-Jan-09 5:15 
QuestionManaging senesitive data Pin
Dushan12321-Jan-09 2:41
Dushan12321-Jan-09 2:41 
AnswerRe: Managing senesitive data Pin
musefan21-Jan-09 2:52
musefan21-Jan-09 2:52 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.