Question: I know we can create a [HashMap](https://docs.oracle.com/javase/8/docs/api/java/util/HashMap.html) in Java. But I want to create a HashMap in C# for my ASP.NET MVC project.

Is this possible to do? If yes, how?

In Java we can create a HashMap like this:

```
import java.util.HashMap;
//...
HashMap<Name, Value> myDictionary = new HashMap<>();

```

Answer: 
Look at `Dictionary<key,value>` in the `System.Collections.Generic`. It is the C# "parallel" (albeit having some differences, it is the closest to) of `HashMap` in Java.
```
var myHashMap = new Dictionary<string,object>();

```

Change the types `string` and `object` to whatever you need.