Flagalac
看到的有点迟

看到的有点迟=-=

话说由于少某个组件上述代码没法直接用我就随便写了个不知道合不合题意=-=

using System;

using System.Collections.Generic;

using System.Linq;

using System.Text;

namespace ConsoleApplication7

{

class Program

{

static void Main(string[] args)

{

int n;

Console.WriteLine("请输入测试数据");

string str=Console.ReadLine();

while(str.IndexOf(" ")>=0)

{

n = str.IndexOf(" ");

str=str.Replace(" ", " ");

Console.WriteLine(n.ToString());

}

Console.WriteLine("转换后数据为:"+str);

Console.ReadKey();

}

}

}