J
juanrendonls96
Guest
Hi, I am kind of new in C#. Just a simple question, I am having trouble to store the values of a changing variable in a list or array. The variable who is constantly changing is movingPointIdx, but it does not store the values and sort them. Thank you
List<int> listXpoints = new List<int>();
listXpoints.Add(movingPointIdx); //movingPointIdx: int variable, which takes different values
listXpoints.Sort();
foreach (int i in listXpoints)
{
Console.WriteLine(i);
}
Continue reading...
List<int> listXpoints = new List<int>();
listXpoints.Add(movingPointIdx); //movingPointIdx: int variable, which takes different values
listXpoints.Sort();
foreach (int i in listXpoints)
{
Console.WriteLine(i);
}
Continue reading...