static void CountChar()
{
Console.WriteLine("请输入一个字符串:");
string s = Console.ReadLine();
Console.WriteLine("请输入要查询的子字符串:");
string[] sub ={Console.ReadLine()};
string[] arr = s.Split(sub,StringSplitOptions.None);
Console.WriteLine("{0}出现的次数为:{1}",sub[0],arr.Length-1);
}