Fortune.cs 569 B

123456789101112131415161718192021222324
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Text;
  4. namespace PlatformBenchmarks
  5. {
  6. public class Fortune : IComparable<Fortune>, IComparable
  7. {
  8. public int Id { get; set; }
  9. public string Message { get; set; }
  10. public int CompareTo(object obj)
  11. {
  12. return CompareTo((Fortune)obj);
  13. }
  14. public int CompareTo(Fortune other)
  15. {
  16. // Performance critical, using culture insensitive comparison
  17. return String.CompareOrdinal(Message, other.Message);
  18. }
  19. }
  20. }