小编chr*_*890的帖子

var [] []数组删除特定的单词

我有点问题.我有一个带有"NaN"值和双打的.csv(例如0.6034),我试图将CSV的双打读入数组[y] [x].

目前,我读了整个.csv,但我无法在之后删除所有"NaN"值.(它应解析CSV并将数字添加到数组[y] [x]并保留所有"NaN")

我目前的代码:

 var rows = File.ReadAllLines(filepath).Select(l => l.Split(';').ToArray()).ToArray(); //reads WHOLE .CSV to array[][]


        int max_Rows = 0, j, rank;
        int max_Col = 0;
        foreach (Array anArray in rows)
        {
            rank = anArray.Rank;
            if (rank > 1)
            {
                 // show the lengths of each dimension
                for (j = 0; j < rank; j++)
                {

                }
            }
            else
            {

            }
            // show the total length of the entire array or all dimensions

            max_Col = anArray.Length; //displays columns
            max_Rows++;  //displays …
Run Code Online (Sandbox Code Playgroud)

c# csv arrays remove-if

3
推荐指数
1
解决办法
86
查看次数

标签 统计

arrays ×1

c# ×1

csv ×1

remove-if ×1