使用字符串的IndexOf方法查找,找到返回正确的位置下标,未找到返回-1举例:string str = "我爱北京天安门"; int index = str.IndexOf("爱"); if (index > -1) { Console.Write("找到了"); } else { Console.Write("未找到"); } Console.Read();