ReadFields

By matsuyama - Last updated: 水曜日, 3月 10, 2010 - Save & Share - Leave a Comment
 String[] strCSV = parser.ReadFields(); // 1行読み込み
                         Double[] DouAry = Array.ConvertAll(strCSV, delegate(string value)
                         {
                             return Double.Parse(value);
                         });
                         for (int i = 0; 0 < DouAry.Length; i++)
                         {
                             if (DouAry[i] == ' ')
                             {
                                 Double byAry = DouAry[i].ReadByte();
                                 if (byAry < '0' || byAry > '9')
                                 {
                                     break;//0~9以外なら抜ける
                                 }
                                 if (byAry != -1)
                                 {
                                     aryList.Add((byte)nret);
                                 }
                             }
                         }

                             ////CSVarylist = (Convert.ToInt32(strCSV[i]));

                         //int intCSV = int.Parse(strCSV, NumberStyles.AllowThousands);
                         // 受信文字列の取得
Posted in ファイル読み込み • • Top Of Page

Write a comment

Time limit is exhausted. Please reload the CAPTCHA.

*