我有一个名为帖子摘要的页面。在此页面下,我想统计总字数和唯一字数。我成功地计算了帖子中的总字数。但是,我不知道如何计算唯一单词。
例如:“我今天非常喜欢上学。”
预期输出:
Total word count: 6
Unique word count: 5
这是我当前的代码:
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
namespace empTRUST
{
    public partial class PostSummary : Form
    {
        string target_fbid;
        string fbStatus;
        public PostSummary(string target_fbid, string fbStatus)
        {
            InitializeComponent();
            this.target_fbid = target_fbid;
            this.fbStatus = fbStatus;
        }
        private void PostSummary_Load(object sender, EventArgs e)
        {
            label_totalwordcount.Text = fbStatus.Split(new char[] {' '}, StringSplitOptions.RemoveEmptyEntries).Length.ToString();
        }
    }
}