Hashtable

using System.Collections;

void LlenarHastable()
{
Hashtable Table = new Hashtable();
Table.Add(0, “HasUno”);
Table.Add(1, “HasDos”);
Table.Add(2, “HasTres”);
LeerHastable(Table);
}

void LeerHastable(Hashtable Datos)
{
string dUno = Datos[0].ToString();
string dDos = Datos[1].ToString();
string dTres = Datos[2].ToString();

string valor;
for (int i = 0; i < Datos.Count; i++)
{
valor = Datos[i].ToString();
}
}

Deja un comentario

Fill in your details below or click an icon to log in:

Logo de WordPress.com

You are commenting using your WordPress.com account. Log Out / Cambiar )

Twitter picture

You are commenting using your Twitter account. Log Out / Cambiar )

Facebook photo

You are commenting using your Facebook account. Log Out / Cambiar )

Connecting to %s

Seguir

Get every new post delivered to your Inbox.