111,098
社区成员




class MyHash : System.Collections.Hashtable
{
public override void Add(object key, object value)
{
if (key is string)
{
string s = ((string)key).ToUpper();
base.Add(key, value);
}
else
{
throw new ArgumentException("key is not a string");
}
}
public override object this[object key]
{
get
{
if (key is string)
{
string s = ((string)key).ToUpper();
return base[s];
}
else
{
throw new ArgumentException("key is not a string");
}
}
set
{
base[key] = value;
}
}
}