Regardless if it's possible and what happens, just don't do it. Why? Because:
- it's ugly,
- it's against the purpose of the
using
statement, - it's barely readable code,
- it's poorly maintainable,
- it's not undestandable by anyone else, and not even by yourself starting from tomorrow,
- it's an apparent code smell — an indication you hardly know what you are doing and that you are struggling with structuring your code properly.
Update: The direct consequence of points (3) and (5) above is that I misunderstood your code and thought you were assigning the new instance of TextReader
into obj2
. I just didn't spot there was some other variable obj
with a barely different name.