Ho fatto una prova...
Ho importato: using System.Collections;
Al clic di un bottone faccio questo:
ma mi vengono restituiti questi errori:codice:private void Button1_Click(object sender, System.EventArgs e) { HashTable lista = new HastTable(); lista.Add["Rossi","Mario"]; }
1- c:\inetpub\wwwroot\hanstbl\WebForm1.aspx.cs(52): Only assignment, call, increment, decrement, and new object expressions can be used as a statement
2- c:\inetpub\wwwroot\hanstbl\WebForm1.aspx.cs(51): The type or namespace name 'HashTable' could not be found (are you missing a using directive or an assembly reference?)
3- c:\inetpub\wwwroot\hanstbl\WebForm1.aspx.cs(52): The type or namespace name 'lista' could not be found (are you missing a using directive or an assembly reference?)
Come posso definire DOVE salvare gli hanstbl? posso scegliere io il nome?

Rispondi quotando