C
cate
.... ht = new Hashtable()
{
{"op1", (string)""},
{"op2", new Hashtable()}
}
When I access this hash, the compiler requires I cast it. Why?
Didn't I just define it?
This is required
string s = (string)ht["op1"];
where I would think the following would suffice. (it doesn't)
string s = ht["op1"];
Is this requirement to cast correct or do I have something else going
on? Thank you.
{
{"op1", (string)""},
{"op2", new Hashtable()}
}
When I access this hash, the compiler requires I cast it. Why?
Didn't I just define it?
This is required
string s = (string)ht["op1"];
where I would think the following would suffice. (it doesn't)
string s = ht["op1"];
Is this requirement to cast correct or do I have something else going
on? Thank you.