2011-02-14 81 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); 

這可以做一個好了很多,但它的一個開始:)當我後來有更多的時間我會更新。

相關問題