A: According to the punctuation branch, the code is simple
Two: Code
usingSystem;usingSystem.Collections.Generic;usingSystem.ComponentModel;usingSystem.Data;usingSystem.Drawing;usingSystem.Linq;usingSystem.Text;usingSystem.Windows.Forms;namespacelines{ Public Partial classFrm_main:form { PublicFrm_main () {InitializeComponent (); } Private voidBtn_true_click (Objectsender, EventArgs e) {StringBuilder P_stringbuilder=//creating a string processing object NewStringBuilder (txt_string. Text); for(inti =0; I < P_stringbuilder. Length; i++)//Start Loop if(P_stringbuilder[i] = =',')//determine if the (,) number appearsP_stringbuilder. Insert (++i,//add line breaks to stringsEnvironment.NewLine); Txt_lines.text=//get the string after the branchP_stringbuilder. ToString (); BOOLP_BL ="ABC"=="ABC"; MessageBox.Show (P_BL. ToString ()); } }}
Three: Reverses the output of each character of the string:
Four: Related code
usingSystem;usingSystem.Collections.Generic;usingSystem.ComponentModel;usingSystem.Data;usingSystem.Drawing;usingSystem.Linq;usingSystem.Text;usingSystem.Windows.Forms;namespacereversestr{ Public Partial classFrm_main:form { PublicFrm_main () {InitializeComponent (); } Private voidTxt_input_textchanged (Objectsender, EventArgs e) { Char[] p_chr=txt_input. Text.tochararray ();//get an array of bytes from a stringArray.reverse (P_CHR,0, Txt_input. Text.length);//Invert byte Array (object character array, start position, invert length)Txt_output. Text =//converts a byte array to a string and outputs NewStringBuilder (). Append (P_CHR). ToString (); } }}