ACR_ServerMisc.ACR_ServerMisc.DictionaryIterateNext C# (CSharp) Method

DictionaryIterateNext() private method

Advance Dictionary Iterator to next Key-Value pair and return its Key.
private DictionaryIterateNext ( string DictID, string &Key ) : bool
DictID string Supplies the id of the Dictionary to access. ///
Key string Output is the first Key in the SortedDictionary. ///
return bool
        private bool DictionaryIterateNext(string DictID, out string Key)
        {
            IDictionaryEnumerator ide;

            Key = "";

            if (StorageIteratorList.TryGetValue(DictID, out ide) == false)
                return false;

            // If another element does not exist, return false
            if (ide.MoveNext() == false)
            {
                StorageIteratorList.Remove(DictID);
                return false;
            }

            Key = (string)ide.Key;

            return true;
        }