METHOD

DbDataReader.NextResult

Advances to the next result set, returning false if none remains. The next set has its own row cursor and schema; call Read before accessing its values. Batch support depends on the provider.

Formal Syntax & Structure

csharp syntaxcsharp
reader.NextResult()

Working Example

Example Snippetcsharp
using System;using System.Data;using System.Data.Common;using var a=new DataTable(); using var b=new DataTable(); a.Columns.Add("Id",typeof(int)); b.Columns.Add("Name",typeof(string)); using var r=new DataTableReader(new[]{a,b}); Console.WriteLine(r.NextResult()); // True
C# & .NET Reference