Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- private List<Summary> deserializeCSV(string pSource, int pageSize)
- {
- List<Summary> ret = new List<Summary>(pageSize);
- string[] lines = pSource.Split(new char[] { 'n' });
- Parallel.For(1, lines.Length - 1, i =>
- {
- string[] col = lines[i].Split(',');
- ret.Add(new Summary
- {
- Complaint_Type = col[0],
- Product = col[1],
- ProductGroup = col[2],
- Brand = col[3],
- Each_UPC = col[4],
- SUBJECTCATEGORY_DESC = col[5],
- GROUP_DESC = col[6],
- SUBGROUP_DESC = col[7],
- SUBJECT_DESC = col[8],
- State = col[9],
- CITY = col[10],
- FullZip = col[11],
- Zip = col[12],
- IssueDate = DateTime.Parse(col[13]),
- ComplaintsCount = Single.Parse(col[14]),
- Gender = col[15],
- AgeBucket = col[16],
- Population = Single.Parse(col[17]),
- _RowID = int.Parse(col[18]),
- _RowIDComp = int.Parse(col[19]),
- ComplaintsCount_New = Single.Parse(col[20]),
- Population_New = Single.Parse(col[21]),
- Country = col[22],
- _ID = long.Parse(col[23]),
- C40_CODE = col[24]
- });
- });
- return ret;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement