DbDataReader.GetEnumerator Method
Definition
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.
When overridden in a derived class, returns an enumerator that can be used to iterate through the rows in the data reader.
public:
abstract System::Collections::IEnumerator ^ GetEnumerator();
public abstract System.Collections.IEnumerator GetEnumerator ();
abstract member GetEnumerator : unit -> System.Collections.IEnumerator
Public MustOverride Function GetEnumerator () As IEnumerator
Returns
An enumerator that can be used to iterate through the rows in the data reader.
Implements
Remarks
Although you can use this method to retrieve an explicit constructor, in languages that support an explicit foreach construct, it is simpler to use the looping construct directly in order to iterate through the rows in the data reader.
If you implement this method, it should return a new instance of DbEnumerator or ensure that your enumerator returns IDataRecord objects.
Applies to
See also
Pripomienky
https://aka.ms/ContentUserFeedback.
Pripravujeme: V priebehu roka 2024 postupne zrušíme službu Problémy v službe GitHub ako mechanizmus pripomienok týkajúcich sa obsahu a nahradíme ju novým systémom pripomienok. Ďalšie informácie nájdete na stránke:Odoslať a zobraziť pripomienky pre