This is one of those days where you need a small help on something rather obvious, I need to create an array of decremental years and need to display five years decrement from current year now it would be like (2012,2011,2010,2009,2008) etc….
I can’t think of how to do it in c# any help would be welcome.
Regards
How about this?
Enumerable.Range(int start, int count)will give you 5 subsequent numbers, starting from 5 years ago.Reverse()reverses the sequence 😉 andToArray()creates an arrray from it.