[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [DotGNU]Call for test cases... Numeric Formatting

From: Jonathan P Springer
Subject: Re: [DotGNU]Call for test cases... Numeric Formatting
Date: Tue, 26 Nov 2002 11:59:56 -0500
User-agent: Mutt/1.4i

On Tue, Nov 26, 2002 at 02:06:51AM +0530, Gopal V wrote:
> If memory serves me right, Jonathan P Springer wrote:
> >  I'm giving StringBuilder quite a workout.
> A StringBuilder is always more efficent than basic string concat 
> operations ... (maybe not always ... but most of the time ... ;-)
> In theory this should be faster than string '+' ... (But you knew
> that already .. and that's why you used SB ... )

Mostly.  There are a couple of places I use '+' because it's more
readable, and I come from the "don't performance tune until it works"
> I really want to write a hex dumper in C# ... with the formatting
> stuff of course ...

Give it a go.  String.Format("0x{X2}",(byte)255) --> "0xFF".  Sounds
like a solid test.
> Btw,can Michael Moore reuse any of your cool stuff for formatting
> support ? ... viz for printing "09" instead of simply "9" .... I 
> suppose the string formatting could do that ? ..

String.Format("{D2}", (int)9) --> "09", I think.  I'll add both of these
as test cases :-).
> Also I very much prefer to get constant feedback from people 
> working on things .. just so that I can sleep easy ... Rich333
> once surprised us with a 2300 line patch we gave up trying to 
> integrate ... which coincidentially was Numeric formatting .... 

This will be a big patch, but I've been keeping it in sync with CVS.
I'll commit about 10 hours from this e-mail.


-Jonathan P Springer <address@hidden>
"A standard is an arbitrary solution to a recurring problem." - Joe Hazen

reply via email to

[Prev in Thread] Current Thread [Next in Thread]