Reuven Herszkowicz Reuven Herszkowicz - 5 days ago 6
C# Question

string name of a other string name

i need to set a new string and that the user need to set this new string name
for exmple:

int input = 0;
while (input != -1)
{
input = int.Parse(Console.ReadLine());
int count = 0;
count ++;
int ("the " count)= intput;
}


Thanks

Answer

I think, that is, waht do ypu need:

        int input = 0;
        var inputs = new List<int>();
        while (input != -1)
        {
            input = int.Parse(Console.ReadLine());
            int count = 0;
            count++;
            inputs.Add(input);
        }

        var result = inputs.Select((j, i) => Tuple.Create("The " + i, j)).ToList();
Comments