First off, I'm fairly new to coding so my apologies if this is very simple, I'm trying to write a program that counts the number of vowels per line from input data and then displays the counts per line. I'm running into an issue when trying to set the initial capacity of the list that will store the total counts, the capacity keeps getting set to zero even though letters.Count = 15. Below is what I have, and thank you for any and all feedback:
var letters = new List<string>();
var vowels = new char[] { 'a', 'e', 'i', 'o', 'u'};
string input;
while (!String.IsNullOrWhiteSpace(input = Console.ReadLine()))
{
letters.Add(input);
if (letters.Count == input.Length)
break;
}
var length = letters.Count;
var total = new List<int>(length);