370
99.9
Mar 03, 2011
Hello Pet,
the difference is that Dictionary is concrete implementation while IDictionary is just a contract, abstraction.
It is recommended for example to expect as argument an IDictionary rather that concrete Dictionary, or to expose property of IDictionary rather that Dictionary, because this promotes loose coupling. Than you are able to change underlying objects in the future without affecting those who use your object.
Hope this wil help.
Best regards,
Robert