I am creating a dictionary data structure that implements the IDictionary interface. When it comes to implementing this method, I get trapped. I have a calculator that gives the example of the QueenPower, but whatever I am getting, I have to implement IDZiniAnematerator.
Is there any easy way to convert a KeyWalkPure Enumerator to an IDictionaryEnumerator? I know that I can hack the following:
IDictionaryEnumerator GetEnumerator () {new dictionary (this.keyValueEnumerator ()). GetEnumerator (); }
But this is very disabled because it loads all the enumerator data.
Code> // You have told us that you have a public INMERATOR and lieutenant; KevalPear & lt; Vaccines, TVs & gt; & Gt; Key ValueAnemator () {Return something; }
I have created a MyDictionaryEnumerator
which is the IDictionaryEnumerator
interface
// it shows you Public IDictionaryEnumerator requires GetEnumerator () (New MyDictionaryEnumerator (KeyValueEnumerator ());} Public Class MyDictionaryEnumerator: IDictionaryEnumerator {Public MyDictionaryEnumerator (IEnumerator & lt; KeyValuePair & lt; TKey, TValu & gt; & gt; Nummeter) {Nommentator = Enumerator} ;} Public Inimetator & lt; KeyWellPayer & lt; Vaccines, TLL & gt; & gt; Counters; Public Online Entry Entry {Received New dictionary entry (enumerator.orrent.k, enumerator.quirt.value);}} public object key {get {return enumerator.Current.Key;}} public object values {get {return enumerator.Current.Value;} } Public Object Ongoing {get {return Entry;}} Public Bull Move Next () {Return Enumerator. Headbook ();} Public Zero Reset () {Enumerator. Reset}}}
< P> MyDictionaryEnumerator
is a very simple class that builds around KeyValueEnumerator ()
you Diction Ary Entry code> Objects and / or key
and value
(I would say it is implemented)
No comments:
Post a Comment