public int IndexOf(string value, int startIndex);
查找字符串中字符或者字符串首次出现的位置,返回索引值
class Program
{
static void Main(string[] args)
{string a = "aaaaccccdd";
int b = a.IndexOf("cc");}
此时b=4
public int IndexOf(string value, int startIndex);
查找字符串中字符或者字符串首次出现的位置,返回索引值
class Program
{
static void Main(string[] args)
{string a = "aaaaccccdd";
int b = a.IndexOf("cc");}
此时b=4