Deprecated: Function set_magic_quotes_runtime() is deprecated in /nfs/c01/h08/mnt/2939/domains/cidamon.com/html/blog/textpattern/lib/txplib_db.php on line 14
Cidamon: Blog: c#

c#

  • Get Keys of Dictionary data in c#
    07 November, 2010

    A very simply way to collect the keys of a dictionary object to iterate through them is given bellow –

    List<string> keyList = new List<string>(myDictionary.Keys);
    for (int i = 0; i < keyList.Count; i++)
    {
        int myInt = myDictionary[keyList[i]];
    }
    
  • Dictionary, Hashtable and HashSet
    07 November, 2010

    First of all HasSet is different then Dictionary and Hashtable cause it does not allow duplicate value and elements inside a HashSet cannot be accessed through indices, only through an enumerator (which is an iterator).

    Now the difference between Dictionary and Hashtable is though Hashtable takes in a key/value pair, but...

    more..

  • HashSet in dot net 3.5
    07 November, 2010

    HashSet has been introduced in framework 3.5. It inherits the ICollection interface. HashSet cannot be accessed through indices, only through an enumerator.
    HasSet is modeled upon mathematical set. It has methods such as Union, Intersection, IsSubsetOf, IsSupersetOf.
    Add method of HashSet is boolean unlike List. HashSet allows only unique...

    more..

  • Get Keys of Dictionary data in c#
    07 November, 2010

    A very simply way to collect the keys of a dictionary object to iterate through them is given bellow –

    List<string> keyList = new List<string>(myDictionary.Keys);
    for (int i = 0; i < keyList.Count; i++)
    {
        int myInt = myDictionary[keyList[i]];
    }
    
  • Dictionary, Hashtable and HashSet
    07 November, 2010

    First of all HasSet is different then Dictionary and Hashtable cause it does not allow duplicate value and elements inside a HashSet cannot be accessed through indices, only through an enumerator (which is an iterator).

    Now the difference between Dictionary and Hashtable is though Hashtable takes in a key/value pair, but...

    more..

  • HashSet in dot net 3.5
    07 November, 2010

    HashSet has been introduced in framework 3.5. It inherits the ICollection interface. HashSet cannot be accessed through indices, only through an enumerator.
    HasSet is modeled upon mathematical set. It has methods such as Union, Intersection, IsSubsetOf, IsSupersetOf.
    Add method of HashSet is boolean unlike List. HashSet allows only unique...

    more..