473,396 Members | 1,749 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

Defining Enum Members at runtime

HI,

I'd like to wire an enum's properties to a table in a dB at runtime.

Has any one here tried this? Is it possible? And if it is how is it done?

Thanks in advance,
Michael McDowell
Nov 16 '05 #1
2 1821

Do you mean an Enum that you've defined and wish to write to a database (as
in the post) or do you mean to construct an Enum at runtime and then write
it's details to a database?

The first should be simple, then second would beg the question: Why would
you want to create an Enum at runtime?

Thanks.

"Michael.McD" <Mi********@discussions.microsoft.com> wrote in message
news:0A**********************************@microsof t.com...
HI,

I'd like to wire an enum's properties to a table in a dB at runtime.

Has any one here tried this? Is it possible? And if it is how is it done?

Thanks in advance,
Michael McDowell

Nov 16 '05 #2
Hi Dan,

It's a variation on the 2nd option. However your are right it does beg a
few questions and in light of these I've decided to take a diffrent approach.

Thanks for the comments/clarification.

Michael

"Dan Bass" wrote:

Do you mean an Enum that you've defined and wish to write to a database (as
in the post) or do you mean to construct an Enum at runtime and then write
it's details to a database?

The first should be simple, then second would beg the question: Why would
you want to create an Enum at runtime?

Thanks.

"Michael.McD" <Mi********@discussions.microsoft.com> wrote in message
news:0A**********************************@microsof t.com...
HI,

I'd like to wire an enum's properties to a table in a dB at runtime.

Has any one here tried this? Is it possible? And if it is how is it done?

Thanks in advance,
Michael McDowell


Nov 16 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

21
by: Bilgehan.Balban | last post by:
Hi, I have two different enum definitions with members of same name. The compiler complains about duplicate definitions. Is this expected behaviour? Can't I have same-named fields in...
21
by: Andreas Huber | last post by:
Hi there Spending half an hour searching through the archive I haven't found a rationale for the following behavior. using System; // note the missing Flags attribute enum Color {
5
by: Ken Allen | last post by:
I have a need to convert the names of the members of an enumeration into an array of strings at runtime. I have determined a method using reflection. Type theType = typeof(MyEnumName);...
31
by: Michael C | last post by:
If a class inherits from another class, say Form inherits from control, then I can assign the Form to a variable of type Control without needing an explicit conversion, eg Form1 f = new Form1();...
13
by: Don | last post by:
How do I get an Enum's type using only the Enum name? e.g. Dim enumType as System.Type Dim enumName as String = "MyEnum" enumType = ???(enumName)
2
by: Alex Feldman | last post by:
Which of the following is better? Defining an enum type inside a class as a nested type, or in the the namespace? An example of nested type enumerated type would be: public Class Product...
10
by: nambissan.nisha | last post by:
I am facing this problem.... I have to define a structure at runtime as the user specifies... The user will tell the number of fields,the actual fields...(maybe basic or array types or...
34
by: Steven Nagy | last post by:
So I was needing some extra power from my enums and implemented the typesafe enum pattern. And it got me to thinking... why should I EVER use standard enums? There's now a nice little code...
5
by: =?GB2312?B?17/HvyBaaHVvLCBRaWFuZw==?= | last post by:
Hi, I would like to have someone comments on what's the best practice defining error codes in C. Here's what I think: solution A: using enum pros: type safe. better for debug (some debugger...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.