-2

Is there a properties or methods which i could not perform using IDictionary object, where as it can be performed using Dictionary.

The other differences for the Dictionary and IDictionary are present in the below link.

A difference in style: IDictionary vs Dictionary

What is the difference between dictionary(Of String, String) and IDictionary(Of String, String)

IDictionary<string, string> versus Dictionary<string, string>

I want to know what are all the properties and methods which are exposed under Dictionary, and hidden under IDictionary.

Thanks in Advance,

Arun

Community
  • 1
  • 1
Arun Prasad
  • 360
  • 3
  • 18

1 Answers1

4

If you want to know the differences you can simply compare them on MSDN. Those other links aren't the definitions of Dictionary<TKey, TValue>, they're other questions related to them. The source of the definition of these things lives on MSDN.

Dictionary
IDictionary

There are a number of differences that you'll see. For example methods inherited from System.Object such as GetHashCode() and ToString(). The Dictionary is also serializable so has some methods to help with that, which the IDictionary doesn't define. You'll need to look at those and consider if they're important to determine whether you use the interface for a contract, or the Dictionary.

Ian
  • 33,605
  • 26
  • 118
  • 198