PC Review


Reply
Thread Tools Rate Thread

Complex Enum, or better soution??

 
 
Tom
Guest
Posts: n/a
 
      31st Mar 2004
Hi

I am trying to come up with a way of representing a text format,
really i think it should but some values have a child value... all are
fixed:

Default
Number
--1,234
--1,234.00
--1234
--1234.00
--1.234568e+004
Date
--3/31/2004 3:13 PM
--Wednesday, March
--3/31/2004
Time
--3/31/2004 3:13 PM
--3:13:19 PM
--3:13 PM
Percentage
--1,234,00.00 %
--123400.00 %
Currency
--$1234.12.00


Any ideas?

Thanks

Tom
 
Reply With Quote
 
 
 
 
Herfried K. Wagner [MVP]
Guest
Posts: n/a
 
      31st Mar 2004
* Tom <(E-Mail Removed)> scripsit:
> I am trying to come up with a way of representing a text format,
> really i think it should but some values have a child value... all are
> fixed:
>
> Default
> Number
> --1,234
> --1,234.00
> --1234
> --1234.00
> --1.234568e+004
> Date
> --3/31/2004 3:13 PM
> --Wednesday, March
> --3/31/2004
> Time
> --3/31/2004 3:13 PM
> --3:13:19 PM
> --3:13 PM
> Percentage
> --1,234,00.00 %
> --123400.00 %
> Currency
> --$1234.12.00
>
>
> Any ideas?


You can create one large enum:

\\\
Public Enum Format
Default
NumberFloatShort
NumberFloatLong
NumberIntegerShort
NumberIntegerLong
NumberScientific
DateShort
DateLong
DateScientific
...
End Enum
///

--
Herfried K. Wagner [MVP]
<URL:http://dotnet.mvps.org/>
 
Reply With Quote
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Need help finding a soution for Excel formula kp240z Microsoft Excel Worksheet Functions 2 6th Mar 2010 08:27 AM
Alternatives to Enum.Parse and Enum.Format ME Microsoft Dot NET 4 18th May 2005 10:07 AM
Is enum type derived from Enum struct? Jerry Microsoft C# .NET 3 23rd Oct 2004 06:12 AM
Casting a value from a table to an Enum using Enum.ToObject KyleK Microsoft C# .NET 1 11th May 2004 04:07 PM
XP patch 823980 install soution PANKAJ Windows XP Security 0 17th Aug 2003 04:15 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 03:15 PM.