我如何返回IEnumerator
一个SortedDictionary(Of Integer, MyClass)
我有这个。
Dim dictionaryTest As New SortedDictionary(Of Integer, MyClass)
Dim enumerator As IEnumerator(Of Integer, MyClass) = dictionaryTest.GetEnumerator() '<- not possible.
我想要一个像
public function getTestEnumerator() as IEnumerator(Of Integer, MyClass)
return dictionaryTest.GetEnumerator()
end function
IDE 中产生的错误
'System.Collections.IEnumerator' has no type parameters and so cannot have type arguments.