Blog

Output of following code:

static void Main(string[] args) {
string fromString = string.Format(“EF in c#,{0},Delphine;Advance c#,{1},Delphine;EF Core 5,{2},Delphine;Intro to Node.Js,{3},Lucien”, new DateTime(2020, 10, 12), new DateTime(2020, 10, 12), new DateTime(2020, 10, 12), new DateTime(2020, 10, 12)).ToString();

string[] model = fromString.Split(‘;’).ToArray();
var models = (from mod in model
let m = mod.Split(‘,’)

select new Model {
book = m[0],
DateOfIssue = Convert.ToDateTime(m[1]),
AuthorName = m[2],
}).ToList();

Console.WriteLine(models[0].AuthorName);
}