I have an object which has a list of other objects which has a list of yet another object. My favorite example:
public class Artist
{
int ArtistID;
string ArtistName;
List<Album> Albums;
}
public class Album
{
int AlbumID;
string AlbumName
List<Song> Songs
}
public class Song
{
int SongID;
string SongName;
}
Since a song can be covered by many artists, I want to search for all artists that recorded a specific song. I know this can be done using iteration, but I'm sure there's way to do it in a single statement.
List<Artist> list = all artists that sang "Yesterday"
Thank you.