public class TestClass { public void TestMethod() { var countX = 3; var countY = 4; var aaa = Enumerable.Range(0, countY) .SelectMany(y => Enumerable.Range(0, countX) .Select(x => new Vector2Int(x, y))); // (x:0, y:0), (x:1, y:0), (x:2, y:0), // (x:0, y:1), (x:1, y:1), (x:2, y:1), // (x:0, y:2), (x:1, y:2), (x:2, y:2), // (x:0, y:3), (x:1, y:2), (x:2, y:3) } }