System.IO.TextWriter vs System.IO.TextWriter

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • John

    #1

    System.IO.TextWriter vs System.IO.TextWriter

    Hi

    What is the difference between System.IO.TextW riter vs System.IO.TextW riter?

    Thanks

    Regards


  • kimiraikkonen

    #2
    Re: System.IO.TextW riter vs System.IO.TextW riter

    On Apr 13, 5:00 pm, "John" <i...@nospam.in fovis.co.ukwrot e:
    Hi
    >
    What is the difference between System.IO.TextW riter vs System.IO.TextW riter?
    >
    Thanks
    >
    Regards
    Difference? Which difference? They're same.Or you meant StreamWriter?

    Comment

    • John

      #3
      Re: System.IO.TextW riter vs System.IO.TextW riter

      Sorry, just slapped myself..Yes System.IO.Strea mWriter.

      Many Thanks

      Regards

      "kimiraikko nen" <kimiraikkonen8 5@gmail.comwrot e in message
      news:da1987c2-1328-4a25-a14d-d8afe6c47bb0@t1 2g2000prg.googl egroups.com...
      On Apr 13, 5:00 pm, "John" <i...@nospam.in fovis.co.ukwrot e:
      >Hi
      >>
      >What is the difference between System.IO.TextW riter vs
      >System.IO.Text Writer?
      >>
      >Thanks
      >>
      >Regards
      >
      Difference? Which difference? They're same.Or you meant StreamWriter?

      Comment

      • Herfried K. Wagner [MVP]

        #4
        Re: System.IO.TextW riter vs System.IO.TextW riter

        "John" <info@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/>

        Comment

        • kimiraikkonen

          #5
          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.

          Regards,

          Onur Güzel

          Comment

          • Herfried K. Wagner [MVP]

            #6
            Re: System.IO.TextW riter vs System.IO.TextW riter

            "kimiraikko nen" <kimiraikkonen8 5@gmail.comschr ieb:
            >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/>

            Comment

            • kimiraikkonen

              #7
              Re: System.IO.TextW riter vs System.IO.TextW riter

              On Apr 13, 11:15 pm, "Herfried K. Wagner [MVP]" <hirf-spam-me-
              h...@gmx.atwrot e:
              "kimiraikko nen" <kimiraikkone.. .@gmail.comschr ieb:
              >
              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

              Working...