C# Hashtable ToString

Description

Hashtable ToString returns a string that represents the current object.

Syntax

Hashtable.ToString has the following syntax.


public virtual string ToString()

Returns

Hashtable.ToString method returns A string that represents the current object.

Example


/*www . j  a  va  2  s.c om*/
using System;
using System.Collections;
public class SamplesHashtable  {

    public static void Main()  {
       Hashtable myHT = new Hashtable();
       myHT.Add( "one", "1" );

       Console.WriteLine(myHT.ToString() );
    }
}

The code above generates the following result.





















Home »
  C# Tutorial »
    System.Collections »




ArrayList
BitArray
Comparer
Hashtable
Queue
SortedList
Stack