String to stream

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

    #1

    String to stream

    Hi!
    How can I write string object to stream?
  • Jon Skeet

    #2
    Re: String to stream

    Al <ayurov@mail.ru > wrote:[color=blue]
    > How can I write string object to stream?[/color]

    Work out what encoding you want, get the appropriate bytes, and write
    them.

    See http://www.pobox.com/~skeet/csharp/unicode.html for more details.

    --
    Jon Skeet - <skeet@pobox.co m>
    Pobox has been discontinued as a separate service, and all existing customers moved to the Fastmail platform.

    If replying to the group, please do not mail me too

    Comment

    • Jay B. Harlow [MVP - Outlook]

      #3
      Re: String to stream

      Al,
      Have you tried a StreamWriter?

      http://msdn.microsoft.com/library/de...texttofile.asp

      System.IO.Strea mWriter has a constructor that accepts a System.IO.Strea m
      object.

      Hope this helps
      Jay

      "Al" <ayurov@mail.ru > wrote in message
      news:188801c379 3c$4c86fee0$a50 1280a@phx.gbl.. .[color=blue]
      > Hi!
      > How can I write string object to stream?[/color]


      Comment

      • Tom Mertens

        #4
        String to stream

        Use a StreamWriter object. Info and sample on
        <http://msdn.microsoft.com/library/default.asp?
        url=/library/en-
        us/cpref/html/frlrfsystemiost ringwriterclass topic.asp>

        [color=blue]
        >-----Original Message-----
        >Hi!
        >How can I write string object to stream?
        >.
        >[/color]

        Comment

        Working...