Ejemplo n.º 1
0
        private static int Comparer(song sg1, song sg2)
        {
            string s1 = sg1.Genre.ToLower();
            string s2 = sg2.Genre.ToLower();


            for (int i = 0; i < Math.Min(s1.Length, s2.Length); i++)
            {
                if (s1[i] == s2[i])
                {
                    continue;
                }
                if (s1[i] > s2[i])
                {
                    return(1);
                }
                else
                {
                    return(-1);
                }
            }
            if (s1.Length > s2.Length)
            {
                return(1);
            }
            else
            {
                return(-1);
            }
        }
Ejemplo n.º 2
0
 public void AddSong(song sogn)
 {
     infolen.Add(sogn);
 }