Exemple #1
0
        public int CompareTo(object obj)
        {
            IFortune other = obj as IFortune;

            if (other == null)
            {
                throw new ArgumentException($"Object to compare must be of type {nameof(IFortune)}", nameof(obj));
            }

            return(CompareTo(other));
        }
Exemple #2
0
 public int CompareTo(IFortune other)
 {
     return(Message.CompareTo(other.Message));
 }
Exemple #3
0
 public FortuneOrm(IFortune f)
 {
     Id      = f.Id;
     Message = f.Message;
 }