This is the error like
Wes Aday already pointed:
You have to create the
new objects in the for-loop
for each new value:
static void Main(string[] args)
{
EUInput clsEUInput;
List<euinput> list = new List<euinput>();
for (int i = 0; i < 5; i++)
{
clsEUInput = new EUInput();
clsEUInput.RtID = i;
list.Add(clsEUInput);
}
foreach (EUInput obj in list)
{
Console.WriteLine(obj.RtID.ToString());
}
Console.ReadLine();
}
</euinput></euinput>