read files in as literally bites

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

    #1

    read files in as literally bites

    hi, ive been trying to figure out how i can get any type of file read in as
    literally bytes. i tried using the binary reader, but if there was text at
    all in the file, all i got was the text and the encoding for it. i want to
    read all files in as there bit values...how can i do this?
    --
    -iwdu15
  • I Don't Like Spam

    #2
    Re: read files in as literally bites

    iwdu15 wrote:[color=blue]
    > hi, ive been trying to figure out how i can get any type of file read in as
    > literally bytes. i tried using the binary reader, but if there was text at
    > all in the file, all i got was the text and the encoding for it. i want to
    > read all files in as there bit values...how can i do this?[/color]

    Use the StreamReader class. Use the ReadBlock & Read methods.

    You'll probably need the Convert class as well.

    Hope it helps.

    Chris

    Comment

    • Herfried K. Wagner [MVP]

      #3
      Re: read files in as literally bites

      "iwdu15" <jmmgoalsteraty ahoodotcom> schrieb:[color=blue]
      > hi, ive been trying to figure out how i can get any type of file read in
      > as
      > literally bytes. i tried using the binary reader, but if there was text at
      > all in the file, all i got was the text and the encoding for it. i want to
      > read all files in as there bit values...[/color]

      Take a look at the 'FileStream' class.

      --
      M S Herfried K. Wagner
      M V P <URL:http://dotnet.mvps.org/>
      V B <URL:http://classicvb.org/petition/>

      Comment

      Working...