Using system;
Using system. Text. regularexpressions;
Class Program
{
// Convert the amount of Arabic numerals into Chinese uppercase numbers
Static string converttochinese (Double X)
{
String S = x. tostring ("# L # e # D # C # K # e # D # C # J # e # D # C # I # e # D # C # h # e # d # C # G # e # D # C # F # e # D # C #. 0b0a ");
String d = RegEx. Replace (S ,@"((? <=-| ^) [^ 1-9] *) | ((? 'Z' 0) [0a-e] * (? = [1-9]) | (? '-Z '(? = [F-L/.] | $) | ((? 'B' [F-L]) (? 'Z' 0) [0a-l] * (? = [1-9]) | (? '-Z '(? = [/.] | $) "," $ {B }$ {z }");
Return RegEx. replace (d ,". ", delegate (Match m) {return" negative element null 0 0 0 0 0 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3. value [0]-']. tostring ();});
}
Static void main ()
{
Random r = new random ();
For (INT I = 0; I <10; I ++)
{
Double X = R. Next ()/100.0;
Console. writeline ("{0, 14: N2 }:{ 1}", X, converttochinese (x ));
}
}
}
/* Possible output:
5,607,400.68
2,017,723.33
751,181.17
7,849,851.53: zookeeper
2,629,143.90
13,461,629.68
4,594,391.16
13,046,560.60
13,041,371.21
20,639,609.44
*/
Http://topic.csdn.net/u/20101126/14/636c5e88-2297-4ce6-bf40-e6427c2799a4.html