I have this :
IEnumerable<int> intYear = Enumerable.Empty<int>();
how can I insert some values? I Don't see any intYear.Add() method.
Like 2010, 2011, and so on...
You should use an IList<int>
instead of IEnumerable<int>
for that:
IList<int> intYear = new List<int>();
intYear.Add(2011);
// and so on
IList<T>
implements IEnumerable<T>
so you can pass it to any method taking an IEnumerable<T>
as argument.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With