Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
using System;
namespace ClassLibrary1
{
/// <summary>
/// Summary description for Song.
/// </summary>
public class Song
{
public Song()
{
//
// TODO: Add constructor logic here
//
}
public string Title;
public TimeSpan Length;
}
}
using System;
using System.Collections;
namespace ClassLibrary1
{
/// <summary>
/// Summary description for Songs.
/// </summary>
public class Songs
{
private ArrayList m_SongList;
public Songs()
{
m_SongList = new ArrayList();
}
public Song this[int index]
{
get
{
return (Song)m_SongList[index];
}
set
{
m_SongList[index] = value;
}
}
}
}
using System;
using System.Collections;
namespace ClassLibrary1
{
/// <summary>
/// Summary description for Songs.
/// </summary>
public class Songs : IEnumerable
{
private ArrayList m_SongList;
public Songs()
{
m_SongList = new ArrayList();
}
public Song this[int index]
{
get
{
return (Song)m_SongList[index];
}
set
{
m_SongList[index] = value;
}
}
}
}
using System;
using System.Collections;
namespace ClassLibrary1
{
/// <summary>
/// Summary description for Songs.
/// </summary>
public class Songs : IEnumerable
{
private ArrayList m_SongList;
public Songs()
{
m_SongList = new ArrayList();
}
public Song this[int index]
{
get
{
return (Song)m_SongList[index];
}
set
{
m_SongList[index] = value;
}
}
#region Implementation of IEnumerable
public System.Collections.IEnumerator GetEnumerator()
{
return null;
}
#endregion
}
}
private class SongEnumerator : IEnumerator
{
public SongEnumerator()
{
}
}
using System;
using System.Collections;
namespace ClassLibrary1
{
/// <summary>
/// Summary description for Songs.
/// </summary>
public class Songs : IEnumerable
{
private ArrayList m_SongList;
public Songs()
{
m_SongList = new ArrayList();
}
public Song this[int index]
{
get
{
return (Song)m_SongList[index];
}
set
{
m_SongList[index] = value;
}
}
#region Implementation of IEnumerable
public System.Collections.IEnumerator GetEnumerator()
{
return null;
}
#endregion
private class SongEnumerator : IEnumerator
{
public SongEnumerator()
{
}
#region Implementation of IEnumerator
public void Reset()
{
}
public bool MoveNext()
{
return true;
}
public object Current
{
get
{
return null;
}
}
#endregion
}
}
}
using System;
using System.Collections;
namespace ClassLibrary1
{
/// <summary>
/// Summary description for Songs.
/// </summary>
public class Songs : IEnumerable
{
private ArrayList m_SongList;
public Songs()
{
m_SongList = new ArrayList();
}
public Song this[int index]
{
get
{
return (Song)m_SongList[index];
}
set
{
m_SongList[index] = value;
}
}
#region Implementation of IEnumerable
public System.Collections.IEnumerator GetEnumerator()
{
return new SongEnumerator(this);
}
#endregion
private class SongEnumerator : IEnumerator
{
private Songs m_SongsRef;
public SongEnumerator(Songs SongsRef)
{
this.m_SongsRef = SongsRef;
}
#region Implementation of IEnumerator
public void Reset()
{
}
public bool MoveNext()
{
return true;
}
public object Current
{
get
{
return null;
}
}
#endregion
}
}
}
private class SongEnumerator : IEnumerator
{
private Songs m_SongRef;
private int m_Location;
public SongEnumerator(Songs SongRef)
{
this.m_SongRef = SongRef;
m_Location = -1;
}
#region Implementation of IEnumerator
public void Reset()
{
m_Location = -1;
}
public bool MoveNext()
{
m_Location++;
return (m_Location <= (m_SongRef.m_SongList.Count - 1));
}
public object Current
{
get
{
return m_SongRef.m_SongList[m_Location];
}
}
#endregion
}
public object Current
{
get
{
if ((m_Location < 0) || (m_Location >
m_SongRef.m_SongList.Count))
{
return null;
}
else
{
return m_SongRef.m_SongList[m_Location];
}
}
}
using System;
namespace ClassLibrary1
{
/// <summary>
/// Summary description for Class1.
/// </summary>
public class Album
{
public string Artist;
public Songs Songs;
public DateTime DateReleased;
public Album()
{
Songs = new Songs();
}
}
}
public void Add(Song song)
{
// Ignore return value
m_SongList.Add(song);
}
public void Remove(Song song)
{
m_SongList.Remove(song);
}