Click here to Skip to main content
15,893,668 members

Comments by guruece24 (Top 3 by date)

guruece24 17-Jul-15 5:43am View    
Better way can be to use struct instead of class. The problem not coming.

class Program
{
static void Main(string[] args)
{
//EUInput clsEUInput = new EUInput();
structEUInput strctEuinput = new structEUInput();
List<structeuinput> list = new List<structeuinput>();

for (int i = 0; i < 5; i++)
{
strctEuinput.RtID = i;
list.Add(strctEuinput);
}

foreach (structEUInput obj in list)
{
Console.WriteLine(obj.RtID.ToString());
}

}
}

public struct structEUInput
{
public int RtID { get; set; }
}
guruece24 17-Jul-15 1:26am View    
Thank you for everyone who has answered me. He may use your solution but he want to torture me that why he is not accepting. Thanks once again.
guruece24 16-Jul-15 9:25am View    
I told that to my boss, he is not accepting it and asking any other solution?