Wrox Programmer Forums
|
BOOK: Stephens' C# Programming with Visual Studio 2010 24-Hour Trainer
This is the forum to discuss the Wrox book Stephens' C# Programming with Visual Studio 2010 24-Hour Trainer by Rod Stephens; ISBN: 9780470596906
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: Stephens' C# Programming with Visual Studio 2010 24-Hour Trainer section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old May 31st, 2013, 10:59 PM
Authorized User
 
Join Date: May 2013
Posts: 41
Thanks: 0
Thanked 0 Times in 0 Posts
Default Lesson 8, Ex. 1

Rod,

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.
contentRichTextBox.LoadFile(
openFileDialog.FileName,
RichTextBoxStreamType.RichText);

???
 
Old June 1st, 2013, 11:38 AM
Rod Stephens's Avatar
Wrox Author
 
Join Date: Jan 2006
Posts: 647
Thanks: 2
Thanked 96 Times in 95 Posts
Default

Quote:
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.

Quote:
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.
__________________
Rod

Rod Stephens, Microsoft MVP

Essential Algorithms: A Practical Approach to Computer Algorithms

(Please post reviews at Amazon or wherever you shop!)
 
Old June 1st, 2013, 06:47 PM
Authorized User
 
Join Date: May 2013
Posts: 41
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Thanks.

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.





Similar Threads
Thread Thread Starter Forum Replies Last Post
Try It - Lesson 7 oviera5 BOOK: Stephens' C# Programming with Visual Studio 2010 24-Hour Trainer 3 January 18th, 2013 01:25 PM
Lesson 9 ikocijan BOOK: Java Programming 24-Hour Trainer by Yakov Fain 1 November 27th, 2012 01:11 PM
Lesson 4 Femi Sonuga BOOK: Knight's Microsoft Business Intelligence 24-Hour Trainer 0 November 25th, 2011 10:25 AM
Lesson 4 - Try It brookesmith BOOK: JavaScript 24-Hour Trainer 2 September 15th, 2011 05:40 PM
Lesson 4 Mtheys BOOK: Java Programming 24-Hour Trainer by Yakov Fain 3 September 15th, 2011 05:02 AM





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