Click here to Skip to main content
15,886,857 members
Home / Discussions / C#
   

C#

 
GeneralRe: Starting to read a file from an origin with Binaryreader Pin
SimpleData15-Jul-09 4:05
SimpleData15-Jul-09 4:05 
GeneralRe: Starting to read a file from an origin with Binaryreader Pin
Ennis Ray Lynch, Jr.15-Jul-09 4:11
Ennis Ray Lynch, Jr.15-Jul-09 4:11 
AnswerRe: Starting to read a file from an origin with Binaryreader Pin
OriginalGriff15-Jul-09 4:04
mveOriginalGriff15-Jul-09 4:04 
GeneralRe: Starting to read a file from an origin with Binaryreader Pin
SimpleData15-Jul-09 4:13
SimpleData15-Jul-09 4:13 
AnswerRe: Starting to read a file from an origin with Binaryreader Pin
OriginalGriff15-Jul-09 4:33
mveOriginalGriff15-Jul-09 4:33 
GeneralRe: Starting to read a file from an origin with Binaryreader Pin
SimpleData15-Jul-09 4:44
SimpleData15-Jul-09 4:44 
GeneralRe: Starting to read a file from an origin with Binaryreader Pin
Luc Pattyn15-Jul-09 4:54
sitebuilderLuc Pattyn15-Jul-09 4:54 
GeneralRe: Starting to read a file from an origin with Binaryreader Pin
OriginalGriff15-Jul-09 4:59
mveOriginalGriff15-Jul-09 4:59 
Try it with a known file: Save this page to a temporary file, and replace the c:\XXTemp\Test.bin with that file. Then, change as shown below:
using (FileStream fs = new FileStream(@"C:\XXTemp\CodeProject Reply to Message_ Free source code and programming help.mht", FileMode.Open))
    {
    if (fs.CanSeek)
        {
        fs.Seek(0x44, 0);
        byte[] buffer = new byte[100];
        fs.Read(buffer, 0, 100);
        StringBuilder sb = new StringBuilder();
        foreach (byte b in buffer)
            {
            sb.Append((char)b);
            }
        MessageBox.Show(sb.ToString());
        }
    }

Note changes in Seek, buffer size and amount read.
When I run this, I get
Reply to Message. Free source code and programming help
Date: Wed, 15 Jul 2009 15:50:47 +0100
MIME


Open your file in Notepad (not by double clicking) and see if what you get in the MessageBox matches the file.

No trees were harmed in the sending of this message; however, a significant number of electrons were slightly inconvenienced.

This message is made of fully recyclable Zeros and Ones

GeneralRe: Starting to read a file from an origin with Binaryreader Pin
SimpleData15-Jul-09 4:52
SimpleData15-Jul-09 4:52 
GeneralRe: Starting to read a file from an origin with Binaryreader Pin
OriginalGriff15-Jul-09 5:03
mveOriginalGriff15-Jul-09 5:03 
GeneralRe: Starting to read a file from an origin with Binaryreader Pin
SimpleData15-Jul-09 5:08
SimpleData15-Jul-09 5:08 
Questiondelete rows in listView using KeyPressed event and Delete Key Pin
al3xutzu0015-Jul-09 3:14
al3xutzu0015-Jul-09 3:14 
AnswerRe: delete rows in listView using KeyPressed event and Delete Key Pin
Christian Graus15-Jul-09 3:14
protectorChristian Graus15-Jul-09 3:14 
GeneralRe: delete rows in listView using KeyPressed event and Delete Key Pin
al3xutzu0015-Jul-09 3:20
al3xutzu0015-Jul-09 3:20 
GeneralRe: delete rows in listView using KeyPressed event and Delete Key Pin
Christian Graus15-Jul-09 3:45
protectorChristian Graus15-Jul-09 3:45 
GeneralRe: delete rows in listView using KeyPressed event and Delete Key Pin
Nagy Vilmos15-Jul-09 3:52
professionalNagy Vilmos15-Jul-09 3:52 
GeneralRe: delete rows in listView using KeyPressed event and Delete Key Pin
Nagy Vilmos15-Jul-09 3:59
professionalNagy Vilmos15-Jul-09 3:59 
AnswerRe: delete rows in listView using KeyPressed event and Delete Key Pin
MatheusMK35-Aug-09 10:40
MatheusMK35-Aug-09 10:40 
QuestionRecreate OracleDataReader? Pin
Mark McArthey15-Jul-09 3:10
Mark McArthey15-Jul-09 3:10 
AnswerRe: Recreate OracleDataReader? Pin
Ennis Ray Lynch, Jr.15-Jul-09 3:24
Ennis Ray Lynch, Jr.15-Jul-09 3:24 
QuestionEnum outlook folder Pin
john563215-Jul-09 2:59
john563215-Jul-09 2:59 
AnswerRe: Enum outlook folder Pin
benjymous15-Jul-09 3:22
benjymous15-Jul-09 3:22 
QuestionRe: Enum outlook folder Pin
john563215-Jul-09 21:29
john563215-Jul-09 21:29 
AnswerRe: Enum outlook folder Pin
benjymous15-Jul-09 22:25
benjymous15-Jul-09 22:25 
GeneralRe: Enum outlook folder Pin
john563215-Jul-09 22:40
john563215-Jul-09 22:40 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.