软件开发方向:字符串数组的Indexof()方法为什么不能用

软件开发方向:字符串数组的Indexof()方法为什么不能用

public double[,] GetLoadData(string[] strArr)
        {
            double[,] S = new double[16, 8];
            foreach (string str in strArr)
            {
                strArr.indexof() //在自动提示里面,不出现indexof()这个函数。
                 
                string[] strArray=str.Split(new char[] {' '}, StringSplitOptions.RemoveEmptyEntries);
                 
            }
            return S;

字符串数组,在foreach 循环里面想获取当前变量的索引,使用了indexof,自动提示里面根本没有这个方法,什么问题?

你要的学习资料到了- Web前端开发交流群036

原文地址:https://www.cnblogs.com/xsns/p/6819658.html