How to write a class that (like array) can be indexed with `arr[key]`?

Viewed 16314

Like we do Session.Add("LoginUserId", 123); and then we can access Session["LoginUserId"], like an Array, how do we implement it?

4 Answers
Related