Microsoft interview question

write a function that implements the using statement (as the VS does...)