|
 |
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 tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
|
 |
|
|

December 16th, 2011, 10:14 AM
|
Registered User
|
|
Join Date: Nov 2011
Location: Sweden
Posts: 6
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
Chapter 12 exercise 4 outside US
Hi.
Just some info for other forigen students….
I’m from Sweden and when I download the solution for 12-4 and try to run it I got FormatExeption.
I tried to pase my output in to this message so you could see what it loked like but it was not accepted
I tried to figure out the problem by reding the tips in the exeption but that didn’t help (I still need to learn more I think) so I did som trial and error or like it said in the book… I staired real hard at the code like they did on the old days (I’m a mainframeprogrammer converting to .NET. That’s the reason for me reding this book)
In Sweden we don’t write ammount like $10,000.00
Here propper amounts would be 10 000,00 or 10 000,00kr or 10.000,00kr
So by changing the text in all textboxes I finally got it to work.
Cheers
|

December 16th, 2011, 10:31 AM
|
 |
Wrox Author
|
|
Join Date: Jan 2006
Location: , , .
Posts: 647
Thanks: 2
Thanked 96 Times in 95 Posts
|
|
Lesson 34 has more to say about internationalization. I wrote all of the examples on my computer set up for United States English so things like monetary values use that format. So, as you noticed, they probably won't work properly in other countries. Sorry about the confusion.
You found the right solution: change the values to use your local formats. There are ways you can make things like int.Parse read formats from countries other than the one you're in but that would just confuse matters and not be all that helpful.
Note that values inside your code should always be in the United States formats. Not because those are better but to be consistent Microsoft had to pick something and, since they developed C# in the United States, that's the format they decided to use. Hopefully the difference won't be too annoying.
|

December 16th, 2011, 10:42 AM
|
Registered User
|
|
Join Date: Nov 2011
Location: Sweden
Posts: 6
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
Thank’s Rod.
I just wanted to help/inform other students that might have the same problem.
I’ll struggle on. In January I will take a real class and by then I will hopefully have some basic knowledge about Visual Studio and C# in order to get the moste out of the class.
I’m really enyoying your book so far.
|

December 16th, 2011, 10:51 AM
|
 |
Wrox Author
|
|
Join Date: Jan 2006
Location: , , .
Posts: 647
Thanks: 2
Thanked 96 Times in 95 Posts
|
|
I agree. It's the sort of issue that can be a real problem if you're new to all this. (I've worked on some big programs (written by other people) where a similar problem made them fail only in specific countries and only on some computers and it was a big hassle.)
If you get stuck like this again, feel free to let me know and I'll try to help. I hate to waste your time on something like this.
|
Thread Tools |
Search this Thread |
|
|
Display Modes |
Linear Mode
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
|
 |
All times are GMT -4. The time now is 09:31 AM.
|