MemoryCache.GetEnumerator Method
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Creates an enumerator that can be used to iterate through a collection of cache entries.
protected:
override System::Collections::Generic::IEnumerator<System::Collections::Generic::KeyValuePair<System::String ^, System::Object ^>> ^ GetEnumerator();
protected override System.Collections.Generic.IEnumerator<System.Collections.Generic.KeyValuePair<string,object>> GetEnumerator();
override this.GetEnumerator : unit -> System.Collections.Generic.IEnumerator<System.Collections.Generic.KeyValuePair<string, obj>>
Protected Overrides Function GetEnumerator () As IEnumerator(Of KeyValuePair(Of String, Object))
The enumerator object that provides access to the items in the cache.
The enumerator that is returned by the GetEnumerator method can be used to iterate over entries in the cache.
Важно
Retrieving an enumerator for a MemoryCache instance is a resource-intensive and blocking operation. Therefore, the enumerator should not be used in production applications.
Продукт | Версии |
---|---|
.NET | 8 (package-provided), 9 (package-provided), 10 (package-provided) |
.NET Framework | 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1 |
.NET Standard | 2.0 (package-provided) |
Обратна връзка за .NET
.NET е проект с отворен код. Изберете връзка, за да предоставите обратна връзка: