Yeah, I wondered too if this calls the database twice.
Somehow, you'd think that you just call the Close method on the returned reader. But I guess that to get that Reader, the code in GetUsefulData is called again.
Either way, closing just the Reader should work fine, and IMHO, it looks more natural than closing the result of the method....
Cheers,
Imar
---------------------------------------
Imar Spaanjaars
Everyone is unique, except for me.
|