I've never used Dictionaries before, and I'm just looking to learn more about them.
I'm a bit lost when it comes to Custom Objects. Is it possible to use a custom object like the class below, as the Key, rather than the value?
class Car
{
public Car(int id, string model)
{
ID = id;
Model = model;
}
public int ID { get; private set; }
public string Model { get; private set; }
}
If you where to create a Dictionary, Like this :-
Dictionary<Car, bool> Cars = new Dictionary<Car, bool>();
How would you use the Car object as a Key, when searching the Dictionaries contents?