Hi there,
Trying to create an uebersimple class that implements get enumerator, but failing madly due to lack of simple / non-functioning examples out there. All I want to do is create a wrapper around a data structure (in this case a list, but I might need a dictionary later) and add some functions.
public class Album
{
public readonly string Artist;
public readonly string Title;
public Album(string artist, string title)
{
Artist = artist;
Title = title;
}
}
public class AlbumList
{
private List<Album> Albums = new List<Album>;
public Count { get { return Albums.Count; } }
.....
//Somehow GetEnumerator here to return Album
}
Thanks!