Re: System.IO.TextW riter vs System.IO.TextW riter
On Apr 13, 6:16 pm, "Herfried K. Wagner [MVP]" <hirf-spam-me-
h...@gmx.atwrot e:
"John" <i...@nospam.in fovis.co.ukschr ieb:
>
Sorry, just slapped myself..Yes System.IO.Strea mWriter.
>
'StreamWriter' inherits from 'TextWriter' and extends it. Note that you
cannot instantiate 'TextWriter' because it is marked as 'MustInherit'.
>
--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://dotnet.mvps.org/dotnet/faqs/>
IMHO, another point about being extended of StreamWriter/Reader,
that's compatible with "Using" statement which performs automatic
dispose / close methods. If you use TextWriter/Reader you must
explicitly use close / dispose method.
>IMHO, another point about being extended of StreamWriter/Reader,
>that's compatible with "Using" statement which performs automatic
>dispose / close methods. If you use TextWriter/Reader you must
>explicitly use close / dispose method.
How would you use 'TextReader' if it cannot even be instantiated?
--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://dotnet.mvps.org/dotnet/faqs/>
IMHO, another point about being extended of StreamWriter/Reader,
that's compatible with "Using" statement which performs automatic
dispose / close methods. If you use TextWriter/Reader you must
explicitly use close / dispose method.
>
How would you use 'TextReader' if it cannot even be instantiated?
>
--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://dotnet.mvps.org/dotnet/faqs/>
Just wanted to point out "Using" statement is used with StreamWriter
not with TextWriter, but i can be wrong, sorry.
Comment