I found this piece of code on stackoverflow some time ago, but can't seem to find it again. All credit to the author. Sorry I could not link.
QUESTION? Can some C# LINQ guru please break down this statement step by step as I am having difficulty understanding it. It certainly works well and does the job, but how?
Line to Split
var line = $"13351.750815 26646.150876 6208.767863 26646.150876 1219.200000 914.400000 0.000000 1 \"Beam 1\" 0 1 1 1 0 1 1e8f59dd-142d-4a4d-81ff-f60f93f674b3";
var splitLineResult = line.Trim().Split('"')
.Select((element, index) => index % 2 == 0
? element.Split(new[] { ' ' }, StringSplitOptions.RemoveEmptyEntries)
: new string[] { element })
.SelectMany(element => element).ToList();
Result of Statement in LinqPad