Foreach loops provides ability to loop through a collection of data.
.Net framework itself uses IEnumerable and IEnumerator interfaces to implement the foreach loop.
Even we can make our own classes to be used in foreach by implementing IEnumerable.