public int CompareTo(ProgramCategory other)
 {
     if (other == null)
     {
         return(1);
     }
     return(this.Name.CompareTo(other.Name));
 }
 public bool Equals(ProgramCategory other)
 {
     return(this == other);
 }
Exemple #3
0
 /// <summary>
 /// Create a new instance of ProgramItem.
 /// </summary>
 /// <param name="category">The initial category to which this item belongs to.</param>
 /// <param name="name">The name of this item.</param>
 /// <param name="isDirectory">Whether or not this item is a directory.</param>
 public ProgramItem(ProgramCategory category, string name, bool isDirectory = false)
 {
     this.Name        = name;
     this.Category    = category;
     this.IsDirectory = isDirectory;
 }