double[] a1 = new double[1000];    
                    string mylinea1 = " ";
                    StreamReader myReadera1 = new StreamReader(@"D:\360Downloads\新建文件夹\201209\surface\plot\12083108.000", Encoding.GetEncoding("GB2312"));
                    int j = 0;
                    while ((mylinea1 = myReadera1.ReadLine()) != null)
                    {
                        
                        mylinea1 = mylinea1.Replace("  ", " ");
                        mylinea1 = mylinea1.Replace("   ", " ");
                        mylinea1 = mylinea1.Replace("  ", " ");
                        string [] sArraya1 = mylinea1.Split(' ');
                        for (j = 1; j < 1000;j++ )
                        {
                            if (sArraya1[0] = Convert.ToString(53513)) //这一行出错,说无法将类型string隐式转换为bool
                              
                            {
                                a1[0] = Convert.ToDouble(sArraya1[5]);
                                
                            }
                        }                     
                        
                    }
                   求高手解答

解决方案 »

  1.   

    sArraya1[0] == Convert.ToString(53513)
      

  2.   

      if (sArraya1[0] == Convert.ToString(53513))
      

  3.   

    这个程序读不起来求解答
    数据是 
    13586   21.65   41.97  239   32    0    0    0  176    6    0    0
          0 9999    0 9999    5.1   20.0    0   15.2 9999 9999    1    2 9999 9999
    68906   -9.87  -40.34   54   32    6  230    3  249    8    0    0
          0   32    6  600   -1.7   9999    0    3.6   20   10    1    2 9999 9999
    89004   -9.74  -74.19 1440   32 9999  130   13  952    3 9999 9999
          0 9999 9999 9999  -26.7   9999 9999  -21.8 9999 9999    1    2 9999 9999
    78858  -62.67   17.30   48   32    1   40    6  162 9999    0    0
          0   38    1  600   23.1   29.0    0   27.0   20   12    1    2 9999 9999
    个样子
    程序是double[] a1 = new double[1000];    
                        string mylinea1 = " ";
                        StreamReader myReadera1 = new StreamReader(@"D:\360Downloads\新建文件夹\201209\surface\plot\12083108.000", Encoding.GetEncoding("GB2312"));
                        int j = 0;
                        mylinea1 = myReadera1.ReadLine();
                        mylinea1 = myReadera1.ReadLine();
                        while ((mylinea1 = myReadera1.ReadLine()) != null)
                        {
                            j=j+1;
                            mylinea1 = mylinea1.Replace("  ", " ");
                            mylinea1 = mylinea1.Replace("   ", " ");
                            mylinea1 = mylinea1.Replace("  ", " ");
                            string [] sArraya1 = mylinea1.Split(' ');
                           
                        if (sArraya1[0] == Convert.ToString(53513))                             
                                {
                                    a1[0] = Convert.ToDouble(sArraya1[5]);
                                    
                                }
                           }                     
                            但是读不出来,求解答