What does an executereader return?

What does an executereader return?
mathieu_cuprykAsked:
Who is Participating?

[Webinar] Streamline your web hosting managementRegister Today

x
 
SinclairConnect With a Mentor Commented:
Technically, it does return a single value, just like every other function in C#. heh heh heh.
0
 
ozymandiasCommented:
A DataReader
0
 
mathieu_cuprykAuthor Commented:
...a single value.
 
 
--------------------------------------------------------------------------------
 
  ...an XML DataSet.
 
 
--------------------------------------------------------------------------------
 
  ...a rowset.
 
 
--------------------------------------------------------------------------------
 
  ...nothing as there is no value to return.
 
0
Never miss a deadline with monday.com

The revolutionary project management tool is here!   Plan visually with a single glance and make sure your projects get done.

 
mathieu_cuprykAuthor Commented:
which of the four?
0
 
ozymandiasCommented:
It returns a class derived from DataReader depending on the type of the Command, i.e. an OdbcCommand.ExecuteReader() returns an OdbcDataReader.
The best answer is probably a rowset.
0
 
SinclairCommented:
It's kind of a pointless question, though, even for an "Intro to C#" course. All you need to do is memorize the right keywords, and you pass... but... that doesn't actually teach you anything. If they asked, "how many rows is the DataReader guaranteed to contain", or "which row is the DataReader's internal pointer pointing to immediately after the method returns", that would at least be something. But even then, who cares ? All that info is in the API comments, it doesn't take too long to look it up.

Sorry, I know that was offtopic, I just find CS classes like this one really frustrating :-(
0
All Courses

From novice to tech pro — start learning today.