I've been given some code to maintain has this structure throughout:
public DataSet GetData()
using(DataSet myData =
// local method that hits a database
I'm relatively new to dotNet so I'm unsure, but I'm thinking that the using block is completely useless here. If the object were actually getting disposed, the method would not be useful. I'm betting that the object is not disposed, the local reference goes out of scope, and the returned object should then be disposed when appropriate.
Hopefully someone here can verify or refute my theory.