J
John
Hi
What is the difference between System.IO.TextWriter vs System.IO.TextWriter?
Thanks
Regards
What is the difference between System.IO.TextWriter vs System.IO.TextWriter?
Thanks
Regards
Hi
What is the difference between System.IO.TextWriter vs System.IO.TextWriter?
Thanks
Regards
John said:Sorry, just slapped myself..Yes System.IO.StreamWriter.
'StreamWriter' inherits from 'TextWriter' and extends it. Note that you
cannot instantiate 'TextWriter' because it is marked as 'MustInherit'.
kimiraikkonen said: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?