p2p.wrox.com Forums

p2p.wrox.com Forums (http://p2p.wrox.com/index.php)
-   BOOK: Stephens' C# Programming with Visual Studio 2010 24-Hour Trainer (http://p2p.wrox.com/forumdisplay.php?f=574)
-   -   Lesson 8, Ex. 1 (http://p2p.wrox.com/showthread.php?t=90245)

John S May 31st, 2013 10:59 PM

Lesson 8, Ex. 1

I sent you this in email:

How are we supposed to know how to do this?

We're supposed to load a file, not just the filename, right?

Even after I looked at the source code from the website, I don't see how we
could know how to do this.

and you replied:

"Yes, load the file. The exercise says to use the RichTextBox's LoadFile and SaveFile methods. Just pass them the names of the selected files. Those methods only work with Rich Text Files but the book will talk about other types of files later.

Rod "

I looked at the source code, but I don't remember you covering this stuff in the book anywhere.. not sure how we are supposed to know how to do this Exercise.

Not sure where you covered something like StreamType:

" // Open the file.


Rod Stephens June 1st, 2013 11:38 AM


How are we supposed to know how to do this?
It says in the description of the exercise how to do this: Use the RichTextBox control's LoadFile and SaveFile methods.

Those methods are summarized in Table 7-3 on page 82. There's a code snippet that demonstrates LoadFile on the bottom of page 82 and there's another snippet that demonstrates SaveFile in the middle pf page 84.


Not sure where you covered something like StreamType:
The Typing Tips sidebar on pages 83 - 84 talks about the stream type parameter. It basically tells the LoadFile method what kind of file it will be loading.

John S June 1st, 2013 06:47 PM


The exercise says TO do it, but doesn't say HOW.

However, I see it was explained back on pages 82-84, as you noted.

Guess I read through that the first time without much of it sticking.

I'll go back and read it again.

All times are GMT -4. The time now is 06:59 AM.

Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.