CSharp · Console
using System;
using System.Collections.Generic;
public class Program
{
public static void Main()
{
var obj = new Teste();
for(int i = 0; i <= 8; i++)
{
obj.Campos.Add(i);
}
obj.Campos.ForEach(x => Console.WriteLine(x));
}
}
public class Teste
{
public List<int> Campos { get; } = new List<int>();
}