Simple weighted search implemented in C#