<p>In most programming languages, dictionaries are preferred over hashtables.
What are the reasons behind that?</p>

Because
```
Dictionary
```
is a generic class (
```
Dictionary<TKey, TValue>
```
), so that accessing its content is type-safe (i.e. you do not need to cast from
```
Object
```
, as you do with a
```
Hashtable
```
).
Compare
```
```
var customers = new Dictionary<string, Customer>();
...
Customer customer = customers["Ali G"];
```
```
to
```
```
var customers = new Hashtable();
...
Customer customer = customers["Ali G"] as Customer;
```
```
However,
```
Dictionary
```
is implemented as hash table internally, so technically it works the same way.