Would somebody please help me out reading 30 char from the user and storing them in a generic list?
This is my code, but it won't iterate except for 11 times!
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace LINQ
{
class Program
{
static void Main(string[] args)
{
Console.WriteLine("Enter 30 letters to be processed");
List list = new List();
for (int i = 0; i < 30; i++)
{
list.Add((char)Console.Read()); //reads the next char into the List
}
Console.Read(); //makes the console wait after the program execution
}
}
}
|
Kirtan PatelPosted Jun 29, 2009, 4:05 PM
asfsdsasdPosted Jun 29, 2009, 12:05 PM
Kirtan PatelPosted Jun 29, 2009, 2:59 AM