I want to write a method which return all key value pairs containing in a IDictionary
as Map.EntrySet() does in java.
I tried as:
For example we define IDictionary
as:
private IDictionary<T, MutableInt> _map = new Dictionary<T, MutableInt>();
The method as:
public KeyValuePair<T, MutableInt> KeyValuePairSet()
{
return KeyValuePair<T, MutableInt>(_map.Keys, _map.Values);
}
while returning statement, the error raised is:
KeyValuePair<T, MutableInt> is a type but used like a variable
How can this method be implemented?