Advertisement
Guest User

Untitled

a guest
Apr 24th, 2019
82
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.54 KB | None | 0 0
  1. public int MatchesWith(object obj)
  2.         {
  3.             Company other = (Company)obj;
  4.  
  5.             Console.WriteLine(name +" has ");
  6.             Console.WriteLine(other.name + " "+other.buyers.Where(buyer => buyer.StartsWith(name)).Count());
  7.             if (other.name.ToLower().StartsWith(name.ToLower()) || other.buyers.Where(buyer => buyer.StartsWith(name)).Count() > 0)
  8.             {
  9.                 return 0;
  10.             }
  11.            
  12.             else
  13.             {
  14.                 return CompareTo(obj);
  15.             }
  16.         }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement