Re: how to parse an Enum Structure in vb.net
- From: Göran Andersson <guffa@xxxxxxxxx>
- Date: Thu, 06 Jul 2006 01:14:56 +0200
Storing the integer value rather than the name does perform better. Storing the names is something that should be considered in some cases, though.
In some cases the names correspond naturally to a number that won't change, for an example the months that are numbered from 1 through 12. Then there is no reason to store the name instead of the number.
In other cases the names have no natural numbering at all, then it might be better to store the names. The numbers are only used internally by the application, and the data in the database is meningful without a translation table.
Dennis wrote:
It seems a waste to use strings as opposed to integers in a database for ENUMS. You can just as easily assign numbers to each enum value, i.e.,.
Enum Month
January = 10
February = 20
March = 30
. . .
In the new enum;
Enum Month
January = 10
February =20
Filibuster = 25
March =30
. . .
- References:
- how to parse an Enum Structure in vb.net
- From: giannik
- Re: how to parse an Enum Structure in vb.net
- From: Phill W.
- Re: how to parse an Enum Structure in vb.net
- From: Dennis
- how to parse an Enum Structure in vb.net
- Prev by Date: Re: Is microsoft awaring VB.Net too hard to maintain?
- Next by Date: Re: timer control
- Previous by thread: Re: how to parse an Enum Structure in vb.net
- Next by thread: Weird problem
- Index(es):
Relevant Pages
|