Return string, return string

Source: Internet
Author: User

Return string, return string

1 using System; 2 using System. collections. generic; 3 using System. linq; 4 using System. text; 5 6 namespace ConsoleApplication3 7 {8 /******************************** * 9: return returns the input string 10 * parameter 11 * Console. readLine () 12 * Basic 13 ************************************ * *********/14 class Program15 {16 static string MyStr (string str) // (string str) 17 {18 string OutStr = "your input data is:" + str; // 19 return OutStr; // return the processed result 20 21} 22 23 static void Main (string [] args) 24 {25 Console. writeLine ("the content you entered is:"); 26 string inputstr = Console. readLine (); // read the input string 27 Console. writeLine (MyStr (inputstr); // reference method, returns the string type, without adding "28" Console. writeLine (); 29} 30} 31}

 

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.