Tell me about Dictionary Object?

Answer Posted / sonali

A dictionary is actually just another collection of
Key/Value pairs, just like a HashTable, except that you
declare a type for the Key and Value.
An example of a simple Dictionary object would be something
like:

Dictionary<int, string> newDict = new Dictionary<int,string>();

When you get the key or value, you are given an actual
Object of a specific type. With a HashTable, the Key and
Value are just Objects, meaning they have no type and must
be converted to something in order to be more than just that.
With a dictionary, you can declare the Object types and get
back useful Objects or those types

Is This Answer Correct ?    1 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is the difference between asp and aspx?

496


Define application-scope?

504


What is asp and how it works?

523


What does asp stand for?

533


Name the asp objects?

483






What is hidden field?

919


How do I open aspx files on windows 10?

511


What are the 3 types of internal controls?

469


How does non-deterministic garbage collection affect my code?

520


Explain the difference between cookies collection and form/querystring collection?

517


Define a variable?

598


What is msmq?

491


How do I open an asp file?

501


Explain how is method overriding different from overloading?

485


. which tag i need to use manually to bind columns in a datagrid ?

1608