Re: StreamReader/StreamWriter
George,
You have been repeated told that...
Code:
using ( identifier /*part1*/)
{
/*part2*/
}
Is EXACTLY the same as
Code:
try
{
/*part1*/
/*part2*/
}
finally
{
identifier.Dispose();
}
Nothing MORE, nothing LESS. It is pruely syntactic "Sugar"..Sweet to read, but provides NO functional value over the alternative.
Re: StreamReader/StreamWriter
Thanks TheCPUWizard,
Your reply is clear. Sorry, it is my misunderstanding before that I think we have to use new something inside the using block. :wave:
Quote:
Originally Posted by TheCPUWizard
George,
You have been repeated told that...
Code:
using ( identifier /*part1*/)
{
/*part2*/
}
Is EXACTLY the same as
Code:
try
{
/*part1*/
/*part2*/
}
finally
{
identifier.Dispose();
}
Nothing MORE, nothing LESS. It is pruely syntactic "Sugar"..Sweet to read, but provides NO functional value over the alternative.
regards,
George