CSharp · Console
using System;
using System.Collections.Generic;
public class Program
{
public static void Main()
{
IEnumerable<IEnumerable<int>> collection = new List<List<int>>()
{
{ 1, 2 },
{ 3, 4 },
};
collection.Dump();
}
}
public static class ListExtensions
{
public static void Add<T>(this List<List<T>> list, params T[] items)
{
list.Add(new List<T>(items));
}
}