using System.Collections.Generic;
public static void Main()
string[] lines = {"Blue,era,Colors/col_image,37,1",
"Pink,aka,Colors/col_image,37,2",
"BlueJay,oko,Birds/col_image,38,3" };
var stuff = (from line in lines
let data = line.Split(',').ToList()
group data by data[3] into c
Category = DefineRange(Convert.ToInt32(c.Key)),
dailyStuffs = (from s in c
CategoryId = Convert.ToInt32(s[3])
Console.WriteLine(c.Category);
foreach(var s in c.dailyStuffs){
Console.WriteLine("\t" + s.StuffName + "\t" + s.ConvertedName + "\t" + s.StuffImage);
private static string DefineRange(int value){
if (value >= 1 && value <= 37)
public string StuffName { get; set; }
public string ConvertedName { get; set; }
public string StuffImage { get; set; }
public int CategoryId { get; set; }
public string Category { get; set; }
public List<DailyStuffs> dailyStuffs;