0
public class ExpiringDictionary<TKey, TValue> : IDictionary<TKey, TValue> {
private class ExpiringValueHolder<T>
{
public T Value { get; set; }
.
.
.
}
private IDictionary<TKey, ExpiringValueHolder<TValue>> innerDictionary;
public IEnumerator<KeyValuePair<TKey, TValue>> GetEnumerator()
{
//throw new NotImplementedException();
return (IEnumerator<KeyValuePair<TKey, TValue>>)innerDictionary.GetEnumerator();
}
}
这里是代码给我铸造错误。有可能为函数GetEnumerator()转换返回值吗?C#类型铸造或转换
谢谢你的帮助。
这很酷。感谢您的快速响应和简单的解决方案.. – AstronBnX 2013-02-18 11:07:20