Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
How to implement vfp str(n,w,d)
Message
De
22/04/2007 16:17:01
 
 
À
22/04/2007 05:33:41
Information générale
Forum:
ASP.NET
Catégorie:
Code, syntaxe and commandes
Versions des environnements
Environment:
C# 2.0
Divers
Thread ID:
01218661
Message ID:
01218696
Vues:
16
Andrus,

Look at the formatting features of the .ToString() method, specifically look up "Numeric Format Strings" in the documentation.

~~Bonnie



>vfp toolkit for .net does not contain str(n,w,d) implementation.
>How implement it in C#?
>
>I tried code below. How to add width and presicion paramers to it ?
>
>public static string Str( float number, ushort width, ushort presicion) {
> return number.ToString();
> }
>
>Should return string whose size if width characters, left padded by spaces and having presicion characters after decimal point using current culture decimal separator.
Bonnie Berent DeWitt
NET/C# MVP since 2003

http://geek-goddess-bonnie.blogspot.com
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform