Initializing a jagged array in C# from an XML file. The following code seems to work to create the data structure I want, from what I can see in the debugger, but the code returns a value of type IEnumerable.
var ia = (from e in XDocument.Load("Test.xml").Descendants("doc") select ( from rows in e.Elements("rows") select ( from cols in rows.Elements("cols") select int.Parse(cols.Value) ).ToArray() ).ToArray()); If I throw in an extra .ToArray() on the end (thanks to other StackOverflow articles), I get back int[1][][].
Any ideas on how to get the code working so I can simply write int[][] array = (from e in... etc.?