Click here to Skip to main content
15,893,594 members
Home / Discussions / C#
   

C#

 
GeneralRe: How to format a number with an implied decimal Pin
Steve Messer17-Jul-08 10:32
Steve Messer17-Jul-08 10:32 
GeneralRe: How to format a number with an implied decimal Pin
Pete O'Hanlon17-Jul-08 10:39
mvePete O'Hanlon17-Jul-08 10:39 
GeneralRe: How to format a number with an implied decimal Pin
PIEBALDconsult17-Jul-08 14:49
mvePIEBALDconsult17-Jul-08 14:49 
GeneralRe: How to format a number with an implied decimal Pin
Steve Messer17-Jul-08 18:09
Steve Messer17-Jul-08 18:09 
GeneralRe: How to format a number with an implied decimal Pin
PIEBALDconsult18-Jul-08 13:48
mvePIEBALDconsult18-Jul-08 13:48 
GeneralRe: How to format a number with an implied decimal Pin
Steve Messer18-Jul-08 17:07
Steve Messer18-Jul-08 17:07 
GeneralRe: How to format a number with an implied decimal Pin
PIEBALDconsult19-Jul-08 3:34
mvePIEBALDconsult19-Jul-08 3:34 
GeneralRe: How to format a number with an implied decimal Pin
Steve Messer19-Jul-08 13:49
Steve Messer19-Jul-08 13:49 
You have assumed that I get the number as a decimal.

I get all the values as a string and also their type.
I also wanted to be able to default to "0.00 if no formatting
was supplied as most client are fine with that format.

1. I parse to decimal as I get it as a string.
2. I default to 0.00 if no format is given
3. I apply the formatting
4. I remove the % if exists
5. I return it as a string since if will be written to a flat file.

If the calling routine did the work and then I need this functionality some
where else then I have to maintain multiple copies. Maintaining the code in
a method allows me to for example default to 0.00

Besides at this point we are trying to impose our coding style on each other
which is fruitless. I appreciate your ideas but you haven't raised any points
that help me solve my problem any better.
AnswerRe: How to format a number with an implied decimal Pin
SilimSayo17-Jul-08 9:26
SilimSayo17-Jul-08 9:26 
GeneralRe: How to format a number with an implied decimal Pin
Steve Messer17-Jul-08 9:43
Steve Messer17-Jul-08 9:43 
GeneralRe: How to format a number with an implied decimal Pin
darkelv17-Jul-08 17:08
darkelv17-Jul-08 17:08 
GeneralRe: How to format a number with an implied decimal Pin
Steve Messer17-Jul-08 18:12
Steve Messer17-Jul-08 18:12 
GeneralRe: How to format a number with an implied decimal Pin
darkelv17-Jul-08 19:23
darkelv17-Jul-08 19:23 
GeneralRe: How to format a number with an implied decimal Pin
Steve Messer18-Jul-08 3:35
Steve Messer18-Jul-08 3:35 
QuestionDragging and dropping a TreeNode onto a ListBox Pin
Jordanwb17-Jul-08 8:29
Jordanwb17-Jul-08 8:29 
AnswerRe: Dragging and dropping a TreeNode onto a ListBox Pin
TheFM23417-Jul-08 8:45
TheFM23417-Jul-08 8:45 
GeneralRe: Dragging and dropping a TreeNode onto a ListBox Pin
Jordanwb17-Jul-08 9:18
Jordanwb17-Jul-08 9:18 
QuestionMail attachments Pin
damianrda17-Jul-08 8:05
damianrda17-Jul-08 8:05 
QuestionWMI Question Pin
#realJSOP17-Jul-08 6:11
mve#realJSOP17-Jul-08 6:11 
AnswerRe: WMI Question Pin
half-life17-Jul-08 6:21
half-life17-Jul-08 6:21 
AnswerRe: WMI Question Pin
Uros Calakovic17-Jul-08 6:35
Uros Calakovic17-Jul-08 6:35 
AnswerRe: WMI Question Pin
Luc Pattyn17-Jul-08 8:33
sitebuilderLuc Pattyn17-Jul-08 8:33 
GeneralRe: WMI Question Pin
#realJSOP17-Jul-08 8:53
mve#realJSOP17-Jul-08 8:53 
QuestionWhat does @ mean now? Pin
Dirso17-Jul-08 5:38
Dirso17-Jul-08 5:38 
AnswerRe: What does @ mean now? Pin
Luc Pattyn17-Jul-08 5:47
sitebuilderLuc Pattyn17-Jul-08 5:47 

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.