# Region converts the lowercase value to uppercase public static string currtochnnum (double currnum) {string sresult = ""; if (math. ABS (currnum) <1e-20) Return "Zero circle"; if (currnum <1e-20) sresult = "negative"; sresult = sresult + stringtochnnum (math. ABS (math. round (currnum, 2 )). tostring (); Return sresult;} Private Static string fournumtochnnum (string STR, string chnnum, ref Boolean pre) {string [] digits = {"0", "one ", "II", "San", "Si", "Wu", "Lu", "Jun"}; int I, j, Len; string sresult = ""; Len = Str. length; for (I = 0; I <Len; I ++) {J = STR [I]-48; If (0 = J) Pre = true; else {If (pre) sresult = sresult + "zero"; sresult = sresult + digits [J] + chnnum. substring (LEN-I-1, 1); Pre = false ;}} return sresult. trim () ;}// convert formatted lowercase strings into uppercase strings Private Static string stringtochnnum (string Str) {const string chnnum1 = "MB"; int I, Len, len1, level, start; string S1; string s; Boolean pre; string sresult = ""; Len = Str. indexof ('. '); Level = (LEN + 3)/4; len1 = Len % 4; If (0 = len1) len1 = 4; Start = 0; for (I = 1; I <= level; I ++) {pre = false; S = Str. substring (START, len1); S1 = fournumtochnnum (S, "", ref pre); If (s1.length> 0) sresult = sresult + S1 + chnnum1.substring (level-I, 1); Start = start + len1; len1 = 4;} Pre = false; S1 = fournumtochnnum (Str. substring (LEN + 1, math. min (2, str. length-len-1), "Angular", ref pre); // S1 = ""; if (s1.length = 0) S1 = "whole "; sresult = sresult + S1; return sresult;} # endregion
C #: Convert lowercase to uppercase