Link to home
Start Free TrialLog in
Avatar of Mike Eghtebas
Mike EghtebasFlag for United States of America

asked on

Why there is no New constructor for dataReader?

This is a part of code I have:

SqlDataReader dr = cmd.ExecuteReader();

If dr is an object and SqlDataReader is a class? What the above code is doing?

Is it instantiating? Or, it already has been instantiated so we are just initializing it.

I appreciate for posing your comment explaining how this is working?
ASKER CERTIFIED SOLUTION
Avatar of Jacques Bourgeois (James Burger)
Jacques Bourgeois (James Burger)
Flag of Canada image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Mike Eghtebas

ASKER

Thanks,

Mike
SOLUTION
Avatar of kaufmed
kaufmed
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial