Method return an interface

前端 未结 6 1017
青春惊慌失措
青春惊慌失措 2021-02-02 01:18

Hi All,

I\'m thinking in this line of code

IDataReader myReader = questDatabase.ExecuteReader(getQuest);

I\'m using DA

6条回答
  •  心在旅途
    2021-02-02 01:39

    "Returns an interface" really means:

    Returns an instance of some class that implements that interface

    In this case, it returns an object very similar to a SqlDataReader object, that lets you to execute methods like Read() and implements the IDisposable and IDataRecord interfaces.

提交回复
热议问题