usingSystem;usingSystem.Collections.Generic;usingSystem.Linq;usingSystem.Text;usingSystem.Threading.Tasks;namespacech05t07{classProgram {Static voidMain (string[] args) {String str="I am a girl"; String[] Word= str. Split (' '); foreach(stringWinchword) {Console.Write ("\ "{0}\"", W); } console.readkey (); } }}
Str. Split () divides the string by the word in a space.
Console.Write ("\" {0}\ "", W); Complete the ability to enclose each word in quotation marks. and \ "To escape the quotation marks. The function is small, but it is very practical.
Static void Main (string[] args) { string sorb; int i; Console.WriteLine ("pleaseinput a string"); Sorb=console.readline (); for 0; i--) { Console.Write (sorb[i-1]); } Console.readkey (); }
The ability to complete the reverse output character. The string is treated as an array of characters and is output backwards.
Words quoted & string inverted