public int CompareTo(MediaToolInfo toolInfo) { if (toolInfo == null) { throw new ArgumentNullException(nameof(toolInfo)); } int result = string.Compare(FileName, toolInfo.FileName, StringComparison.OrdinalIgnoreCase); if (result != 0) { return(result); } result = ModifiedTime.CompareTo(toolInfo.ModifiedTime); if (result != 0) { return(result); } result = Size.CompareTo(toolInfo.Size); if (result != 0) { return(result); } return(string.Compare(Version, toolInfo.Version, StringComparison.OrdinalIgnoreCase)); }
public int CompareTo(Object o) { Modification modification = (Modification)o; return(ModifiedTime.CompareTo(modification.ModifiedTime)); }