I need LINQ to Objects (CSV file) help again, using asp.net; I'm getting an invalid cast (int to string)
I have a CSV file with contents like this (showing first line with headings):
Zip, City, St8, Long, Lat, County
00501,HOLTSVILLE,NY,40.817967,-73.045257,SUFFOLK
00544,HOLTSVILLE,NY,40.8152,-73.0455,SUFFOLK
00601,ADJUNTAS,PR,18.1788,-66.7516,ADJUNTAS
(etc.)
...so I have declared these constants:
const int ZIP_INDEX = 0;
const int CITY_INDEX = 1;
const int ST8_INDEX = 2;
const int LONGITUDE_INDEX = 3;
const int LATITUDE_INDEX = 4;
const int COUNTY_INDEX = 5;
I am trying to query the file using LINQ this way:
private void FindForCounty()
{
RemoveDynamicRows();
string sCounty = TextBox_Criteria.T ...
Go to the complete details ...