IDictionary : IDictionary : Data Structure C# Examples


C# Examples » Data Structure » IDictionary »

 

IDictionary









    
using  System;
using  System.Collections;
using  System.Collections.Generic;
using  System.Collections.ObjectModel;
using  System.Text;

public  class  MainClass
{
        public  static  void  Main()
        {
                IDictionary<string,  decimal>  salaryMap  =  new  Dictionary<string,  decimal>();

                salaryMap.Add("S",  60.5M);
                salaryMap.Add("W",  10.0M);
                salaryMap.Add("J",  30.99M);
                
                Console.WriteLine("{0:C}",  salaryMap["S"]);  
                Console.WriteLine("{0:C}",  salaryMap["J"]);
        }
}
    
   
  
   



Output

$60.50
$30.99


HTML code for linking to this page:

Follow Navioo On Twitter

C# Examples

 Navioo Data Structure
» IDictionary