C#连接加入字符串

using System;

namespace StringApplication {

   class StringProg {

      static void Main(string[] args) {
         string[] starray = new string[]{"Down the way nights are dark",
            "And the sun shines daily on the mountain top",
            "I took a trip on a sailing ship",
            "And when I reached Jamaica",
            "I made a stop"};

         string str = String.Join("/n", starray);
         Console.WriteLine(str);
      }
   }
}

原创文章,作者:ItWorker,如若转载,请注明出处:https://blog.ytso.com/tech/pnotes/265809.html

(0)
上一篇 2022年6月7日 21:11
下一篇 2022年6月7日 21:11

相关推荐

发表回复

登录后才能评论