// Example 9: multi or single dimensional arrays? // We define this extension method public static void Add<T>(this List<T> list, params T[] items) => list.AddRange(items); // And then we can make a flattened matrix var matrix = new List<double> { { 1, 0, 0 }, { 0, 1, 0 }, { 0, 0, 1 } }; Console.WriteLine(matrix.Count);