标题:怎么让字符串输出不换行?
取消只看楼主
飞扬lome
Rank: 1
等 级:新手上路
帖 子:19
专家分:0
注 册:2007-9-13
 问题点数:0 回复次数:0 
怎么让字符串输出不换行?

编写一个控制台应用程序,给字符串中的每个单词加上双引号
using System;
using System.Collections.Generic;
using System.Text;

namespace ConsoleApplication1
{
class Program
{
static void Main(string[] args)
{
string myString = "this is a test";
char[] separator ={ ' ' };
string[] myWords;
myWords= myString.Split(separator);
foreach (string word in myWords)
{
Console.WriteLine("\"{0}\"", word);
}
Console.ReadKey();
}
}
}

让它输出不换行怎么办?

搜索更多相关主题的帖子: 字符 using myWords System 输出 
2007-09-27 20:33



参与讨论请移步原网站贴子:https://bbs.bccn.net/thread-173426-1-1.html




关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 0.013403 second(s), 8 queries.
Copyright©2004-2025, BCCN.NET, All Rights Reserved