public void CountString(string str)
{
StringBuilder sb = new StringBuilder();
List<string> tmp = new List<string>();
for (int i = 0; i < str.Length; i++)
{
string s = str.Substring(i, 1);
int count = str.Split(s.ToCharArray()).Length - 1;
if (!tmp.Contains(s))
{
tmp.Add(s);
sb.Append(s + "," + count.ToString() + "次" + "\r\n");
}
}
MessageBox.Show(sb.ToString());
}