2011-02-14 83 views

回答

0

不知道我是否理解正确,但这里是一个不起作用的小版本文件。

 string s = File.ReadAllText("FilePath"); 

     var words = s.Split(new string[]{" "}, StringSplitOptions.RemoveEmptyEntries); 

     List<string> tagwords = new List<string>(); 

     foreach (var word in words) 
      tagwords.Add(string.Format("<g:price>{0}</g:price>", word)); 

     string newtext = string.Join("", tagwords); 

     File.WriteAllText("Filepath", newtext); 

这可以做一个好了很多,但它的一个开始:)当我后来有更多的时间我会更新。

相关问题