Dictionary Object

  • Thread starter Thread starter bhaktisonu
  • Start date Start date
B

bhaktisonu

how to create a dictionary object ?
how to use it for writing the insert method for multiple tabes having
different properties/ fields.
 
The dictionary object is not the best for updating multiple tables with a
single call. The best version to use, if you want a dictionary object
regardless, is to use syntax like the following:

Dictionary<keyType, valueType> dictionary = new Dictionary<keyType,
valueType>();

Or if you are into VB

Dim dict as new Dictionary<keyType, valueType>()

In the above, you will want to specify a key type and a value type. For
example, if you have orders, you might have something like this:

Dictionary<int, Order> dictionary = new Dictionary<int, Order>();
dictionary.Add(Order.OrderID, Order);

--
Gregory A. Beamer
MVP, MCP: +I, SE, SD, DBA

*************************************************
| Think outside the box!
|
*************************************************
 
Back
Top