✅ Takewhile in foreach iterator exiting without iterating over the elements. - C#