Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.
Start your free trialokilydokily
12,105 PointsI'm trying to visualize in my brain what casting to an Ienumerable would look like.
Can you help me out?
Update: I think what would be involved is what is called an implicit cast? https://docs.microsoft.com/en-us/dotnet/csharp/programming-guide/types/casting-and-type-conversions
For example from ... https://docs.microsoft.com/en-us/dotnet/csharp/programming-guide/interfaces/explicit-interface-implementation
we get these..
SampleClass sc = new SampleClass();
IControl ctrl = sc;
ISurface srfc = sc;
which are examples of implicit casts.
I'm not sure how or if an explicit cast would apply?