public int GetWordCount(string str){ string[] c_str = new string[]{}; c_str = str.split(" "); return c_str.Length;}C# 写的,简单的几句就可以实现.不懂再问