While what you have works, the most straightforward way would be to use the array's index and reference the second item (at index 1 since the index starts at zero for the first element): pkgratio[1]
Console.WriteLine(pkgratio[1]);
A more complete example:
string[] pkgratio = "1:2:6".Split(':');
for (int i = 0; i < pkgratio.Length; i++)
Console.WriteLine(pkgratio[i]);
Your title mentions IEnumerable
but you have a string array. If you had an IEnumerable<string>
then what you have works, or better yet you would use:
// same idea, zero index applies here too
var elem = result.ElementAt(1);
Here is your sample as an IEnumerable<string>
:
var pkgratio = "1:2:6".Split(':').AsEnumerable();
Console.WriteLine(pkgratio.ElementAt(1));