dotgnu-general
[Top][All Lists]
Advanced

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

Re: [DotGNU]System.Write(System.String,char) missing ?


From: Open Source
Subject: Re: [DotGNU]System.Write(System.String,char) missing ?
Date: Wed, 6 Mar 2002 18:16:25 -0800 (PST)

i must have been thinking abt future releases of pnet.

--- Rhys Weatherley <address@hidden> wrote:
> Open Source wrote:
> 
> >    Looks like pnet0.8 System class does not
> support
> 
> What is this pnet 0.8 that you keep referring to?
> We are only up to version 0.3.0 of pnet and 0.1.4
> of pnetlib.
> 
> > Write(System.String,char) method. Since i have no
> > access to the CVS, i was wondering whether this
> method
> > is available.
> 
> That's because there is no such method in the ECMA
> spec.
> 
> To implement the formatted string writes, it is only
> necessary to implement this method in
> "System.String":
> 
> static String Format(IFormatProvider provider,
>     String format, params Object[] args);
> 
> There should be no need to change anything in either
> "System.Console" or "System.IO.TextWriter".  They
> all
> eventually call "Format" in the "String" class.
> 
> The code is reasonably simple: create an instance of
> "System.Text.StringBuilder".  Then, copy characters
> from "format" to the builder, until you come across
> a "{???}" reference.  You format the corresponding
> member of "args" with this information.  When you
> get to the end of "format", call "ToString()" on the
> builder, and you're done.
> 
> See the ECMA docs for "System.String" for more
> information on how formatting works.
> 
> Cheers,
> 
> Rhys.
> 
> 


__________________________________________________
Do You Yahoo!?
Try FREE Yahoo! Mail - the world's greatest free email!
http://mail.yahoo.com/


reply via email to

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