字符串

IndexOf方法的使用

 

#region IndexOf方法的使用

        static void Main(string[] args)
        {
            string email = "xiaoqiang@qq.com";
            int position = email.IndexOf("@");
            Console.WriteLine("@所在位置索引:" + position);
            Console.ReadLine();
        }

#endregion

 

posted @ 2021-11-22 12:09  1010阿龙  阅读(37)  评论(0)    收藏  举报