Transform the number of the renminbi into uppercase representation (C # version)

zhaozj2021-02-12  152

Transform the number of the renminbi into uppercase representation (C # version)

There is nothing to say, it is a way, everyone takes it.

Using system;

Namespace Test.com {///

/// Function: String Processing Function Set /// public class dealstring {#Region private member /// /// input string // / private string infutstring = null; /// /// Output string /// private string outstring = NULL; /// /// 提 提 信息 信息 信息 信息 private string NoteMessage = NULL; #ENDREGION

#Region Public Properties ///

/// Input String /// public string infutstring {get {return infutstring;} set {infutstring = value;}} /// //// Output string /// public string outstring {get {return = value;}} /// /// 提 提 信息 信息 /// public string NoteMessage { Get {return NoteMessage;} set {NoteMessage = value;}} #ENDREGON #REGION constructor PUBLIC DEALSTRING () {// // Todo: Add constructor logic //} #ENDREGION

#Region Public Method Public Void ConvertToChineseNum () {String Numlist = "Zero Zi Zi Lu"; String Rmblist = "Practitioner Picture"; Double Number = String TempoutString = NULL;

Try {Number = Double.Parse (this.inputString);} catch {this.noteMessage = "Parameters Non-numbers!"; return;} if (Number> 9999999999999999) this.noteMessage = "Benefits RMB value";

// The decimal integer string into string tempNumberString = Convert.ToInt64 (number * 100) .ToString (); int tempNmberLength = tempNumberString.Length; int i = 0; while (i 1) {bool zeroStart = TempoutString.Substring ( tempOutString.Length-2,2) .StartsWith ( "zero"); if (zeroEnd && (zeroStart || tempEnd!!)) tempOutString = oneNumberChar;!!} else {if (zeroEnd && tempEnd) tempOutString = oneNumberChar;}}} i = 1;}

While (TempoutString.endswith) {TEMPOUTSTRING = TempoutString.Substring (0, TempoutString.Length-1);}

While (TempoutString.endSwith)) {TEMPOUTSTRING = TempoutString "whole";

THIS.outstring = TempoutString;

} #Endregion}}}

转载请注明原文地址:https://www.9cbs.com/read-6611.html

New Post(0)