I have implemented a Properties class that may contain name-value pairs. They are stored in a Hashtable. Now I want to implement this function:
Enumerator<string> PropertyNames();
How do I do that? When I do GetEnumerator on the Hashtable inside the Properties class, I get a Enumerator<Hashtable.Keys> back. How do I return Enumerator<string>?
Code:
namespace qwerty
{
Class Properties
{
private Hashtable mHashtable = new Hashtable();
public Enumerator<string> PropertyNames()
{
}
public AddProp(string Name, string Value)
{
mHashtable.Add(Name, Value);
return;
}
}
}