Create a custom culture that might be wrong

Hi!

I'm reading in a book and there is some code that might be wrong. Here is 
the code enclosed within ""
"CultureInfo usCulture = new CultureInfo("en-US");
RegionInfo usRegion = new RegionInfo("US");
CultureAndRegionInfoBuilder demoBuilder = new CultureAndRegionInfoBuilder 
("en-US",
     CultureAndRegionModifiers.Neutral);
demoBuilder.LoadDataFromCultureInfo(usCulture);
demoBuilder.LoadDataFromRegionInfo(usRegion);"

As you can see the CultureAndRegionModifiers is set to Neutral but according 
to the MSDN doc this
Neutral should be used when you have a neutral custom culture but here in 
this case you also load the Region info
which should not be included when you define a Neutal culture.

So accoding to me this CultureAndRegionModifiers should be changed to None 
which should be used when you have a specific supplemental custom culture 
which this custom culture is.

Do you agree with me ?

//Tony


0
Tony
3/28/2010 9:33:46 AM
dotnet.languages.csharp 1931 articles. 0 followers. Follow

1 Replies
520 Views

Similar Articles

[PageSpeed] 2

"Tony Johansson" <johansson.andersson@telia.com> skrev i meddelandet 
news:O16v9mlzKHA.6112@TK2MSFTNGP05.phx.gbl...
> Hi!
>
> I'm reading in a book and there is some code that might be wrong. Here is 
> the code enclosed within ""
> "CultureInfo usCulture = new CultureInfo("en-US");
> RegionInfo usRegion = new RegionInfo("US");
> CultureAndRegionInfoBuilder demoBuilder = new CultureAndRegionInfoBuilder 
> ("en-US",
>     CultureAndRegionModifiers.Neutral);
> demoBuilder.LoadDataFromCultureInfo(usCulture);
> demoBuilder.LoadDataFromRegionInfo(usRegion);"
>
> As you can see the CultureAndRegionModifiers is set to Neutral but 
> according to the MSDN doc this
> Neutral should be used when you have a neutral custom culture but here in 
> this case you also load the Region info
> which should not be included when you define a Neutal culture.
>
> So accoding to me this CultureAndRegionModifiers should be changed to None 
> which should be used when you have a specific supplemental custom culture 
> which this custom culture is.
>
> Do you agree with me ?
>
> //Tony
>

Here I noticed that the book is very wrong because the only valid 
alternative for CultureAndRegionModifiers is
Replacement because this culture is a predefined culture.

//Tony 


0
Tony
3/28/2010 9:53:28 AM
Reply:

Similar Artilces:

How do I create a rent balance sheet for multiple units
...

"unable to create this stationery"
After starting-up Windows Live Mail (v. 14), the first time I try "New" to create a new e-mail the system displays an error-box "Unable to create this stationery." I click OK. The system provides a "New Message" template without my signature. I close it. I again click "New." This time (and onward) I get what I want - (a) no error-box and (b) a template with my signature. What can I (or Microsoft) do so that (for the first use of "New" after start-up) I get what I want, namely (a) and (b)? afaik.not possible...if one configur...

ActiveX component can't create object: 'crmaddin.UIUtil' #2
One of our user's outlook keeps getting this error message popup: "ActiveX component can't create object: 'crmaddin.UIUtil'" His outlook on this particular system does not have Outlook for CRM installed. Checked Outlook addins including it's registry for such plugin but there is none shown. I'm unable to find an answer on google. Any1 know any possible solutions? ...

I got dozens of first chance exception of type "Access violation exception" in the CDialog::Create
I derive my own CMyDialog class from CDialog,and got may first chance exception in the Output Window, but the program run fine. does these exception really not matter? How can i get rid of them? Do like we all do: ignore them. joe On Tue, 29 Jun 2004 13:32:57 +0800, "booker" <rekoob@163.net> wrote: >I derive my own CMyDialog class from CDialog,and got may first chance >exception in the Output Window, but the program run fine. > >does these exception really not matter? >How can i get rid of them? > Joseph M. Newcomer [MVP] email: newcomer@flounder.co...

Creating Chart from Userform ListBox selections
This is a multi-part message in MIME format. ------=_NextPart_000_0016_01C911A4.100F32B0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable I have created a Userform with 2 Listboxes on it Listbox1, is populated with ALL values in Sheet3 Column B Listbox2, is populated with ALL values in Sheet3.Column A Column B values are Names Column A are Dates Both Listboxes have Multi-Select enabled. I am trying to set up a chart in Sheet6 with the data from Sheet3, but = am up to the stage of how to create it. Sheet3 data is stored in rows, and eac...

Clickable pie chart
I want to do a 3D pie chart embedded in a work sheet and allow each piece if the pie to be 'clickable' i.e run a designated macro when clicked. One way that occurs to me (but hard in itself) would be to put an invisible cover (autoshape) over the piece and then assign the macro to it; but how would I go about matching its size and shape to the correct dimension and position of the pie peice? Another compromise (if as I think my ideal way is impossible) would be to try and detect the label position (less variable than the pie piece and a convenient rectangle) and then place an i...

Copy of attachment created
I've been using outlook for years but about a month ago, whenever I send an email with an attachment, a copy is made and it sits in my outbox. It is an email that is not addressed but has the same attachment in it. Any suggestions on why this is happening and how to stop creating these extra messages? are you using any add-ins? what about rules on sent items? What type of email account? What firewall, antivirus and antispam products are installed? -- Diane Poremsky [MVP - Outlook] Author, Teach Yourself Outlook 2003 in 24 Hours Need Help with Common Tasks? http://www.outlook-t...

Cannot create folders then advised they exist (but I can't see them) in Outlook 2007
I am having huge problems creating new folders in Outlook 2007.. I try to add the folder as normal, then receive the message "Cannot create the folder. The operation failed. An object cannot be found", so I try again and it says "Cannot create the folder. The server says "Mailbox Exists". However the folder I have tried to add does not display in the Outlook folders list. So have gone to IMAP folders and completed a search on subscribed folders to see the folder I had tried to add is featured, but does not have an envelope next to it (I assume indicating i...

Create Drop Down Box populated by a List
Would someone please tell me if I can Create a Drop Down Box populated by a List from another Worksheet which will Select an item from the Drop Down Box populated by the List from the other Worksheet as Input a given Cell. The Drop Down Box should appear and work that way for any selected Cell. thanks, Ted Hi Ted, You will need to name the list from the other sheet. So, select the list, name it and then in the data valadation allow list and in source box enter =TheNameOfTheList. HTH Regards, Howard "Ted_MD" <TedMD@discussions.microsoft.com> wrote in ...

MS CRM 4
Hi, We're using MS CRM 4.0. When we try to import customizations for a custom entity we keep getting the following error "Either the file could not be uploaded or import failed". It also says "The requested record was not found or you do not have sufficient permissions to view it." We have already spent many hours trying to solve this, but without any success. Please help !!! Hi, This error typically comes when format of customization file is not proper. Can you please provide me more details. Please tell the details about system from which you have exporte...

FROM address with multiple accounts wrong
Hi: I have the following email accounts setup in Outlook: user1@mydomain.com (set as default account) user2@mydomain.com user1@mywork.net Everything is POP/SMTP. I select different accounts to send. Here is the behaviour: If I send an email to anyone it always goes out as coming from user1@mywork.net , regardless of what email I chose to send from. (yes, I've checked the email settings in Outlook, all email addresses are correct--I even tried setting a reply address as well--no joy). So all my replies come back to user1@mywork.net. Weird thing is--I can only get the FROM address to sh...

Wrong SQL?
I am trying to install CRM 3.0 in a SBS 2003 R2 box but in the "System Requirements" window I get the following error message" "The edition "Workgroup Edition" of the specified SQL Server is not supported by this SQL Server reporting Services Installation. Supported editions are Enterprise Edition and Standard Edition" "Workgroup Edition" is the one included with R2 and I don't have "Standard" one. Is there a work-around? TIA Stefano ...

Creating book signatures in Pub 2007.
I am laying out a book that I will hand bind. The book will have 96 pages -- 6 signatures of 4 sheets each. Since I am printing and binding myself, I do not have the tools that a commercial printer has. My question is this: is it possible to lay out 6 sections of 16 pages each in book printing style in one Publisher file? Currently I have 6 different files but adjusting flow and moving pages is almost impossible. I am by no means a professional printer so it is very important to me that the pages print out in "folding format" i.e., page 1 & 16 on one side and pages ...

Custom chart problems
In creating a custom chart, Excel doesn't seem to keep the border an chart background settings at "None"...all the other formatting i retained (fonts, etc.), but the chart always reverts to a solid whit background and a thin black border around the chart. I have to go i manually and remove these each time. Is there any way of creating an retaining these 2 settings as default or as part of a custom chart? Thanks Andre -- Message posted from http://www.ExcelForum.com Andrea - I've never noticed this behavior, but you're right, custom user-defined charts don't supp...

What's wrong with this formula?
=IF(B27>0,+B27:B32-B28,"") Working with numbers only. If false I want the cell to be blank. I'm getting #### Doesn't help to widen cell format of cell is general Thanks hi try =(B27>0,sum(B27:B32)-B28,"") regards FSt1 "Ray" wrote: > =IF(B27>0,+B27:B32-B28,"") > Working with numbers only. If false I want the cell to be blank. > I'm getting #### > Doesn't help to widen cell > format of cell is general > Thanks Are you trying to add the numbers B27 to B32, omitting B28 ? If so, try th...

Creating charts that show change in % rather than $
I have Money 2004. When I create a chart of changing investment value, I'd like the chart in % change rather than dollars. Is there a way to do that? ...

Creating a field to search and enter non duplicate data
Hello all. I have a team of 15 pople that all work with reference numbers, on occasion a number has to be sent to a different work group. I've created a spreadsheet for them to enter the numbers into, but we have been duplicating numbers. I want to create a field to enter th number into, have the field cross reference the exsting numbers, and if it does not find a match, enter the number and sort the list. I know how to create a custom macro that will accomplish what I want to do, but I'd prefer a static formula if it's possible. A formula can not do waht y...

Wrong Investment in Download Activity
I'm running into a frustrating problem that I'm hoping someone has an idea as to how to solve. For what ever reason, Money is trying to match an existing investment to a new investment. Everytime I download my investment statements, it sees I have X shares of MSFT, decides that it doesn't match the existing Microsoft investment, and creates a new investment of "Microsoft Stock". It then adds X shares (essentially doubling it) into the account. I've deleted the "Microsoft Stock" investment multiple times, but it keeps recreating it. How do I get i...

can I create a keyboard shortcut in Excel?
can I create a keyboard shortcut in Excel? Yes. Would you be more specific? -- Greeting from the Gulf Coast! http://myweb.cableone.net/twodays "Vova" <anonymous@discussions.microsoft.com> wrote in message news:09d501c3c96f$43eb6900$a401280a@phx.gbl... > can I create a keyboard shortcut in Excel? A keyboard shortcut to a macro? After you've created the macro, you can tools|macro|macros... Select your macro (don't run it) Options and set it there ok/cancel your way out. Vova wrote: > > can I create a keyboard shortcut in Excel? -- Dave Peterson ec3...

Custom # format
Hello, I would like to display a number * 100, a percentage w/o the percent sign. For example, if I type in .55 I want the sheet to display the number as 55. How can I do this? Thanks -- jstalin ------------------------------------------------------------------------ jstalin's Profile: http://www.excelforum.com/member.php?action=getinfo&userid=27030 View this thread: http://www.excelforum.com/showthread.php?threadid=439704 I don't think you can. Can you just type 55 and use A1/100 in subsequent formulas? Or use a helper cell to display what you want? jstalin wrote: >...

Something may be wrong with my Ram,motherboard,hard drive or whatnot? Help me =[
Alright when i start up my laptop it goes into the HP invent screen and shows the F keys at the bottom. Than after a little bit it goes onto the screen that has the blinking underscore (the blinking _ sign" than it just stays there... It makes these loud beeping noises than stops after a little bit. I don't know what to do and I REALLY don't want to take it to a professional for reasons i don't wish to say. Edit: I don't think that I have my system restore CD's as well, and I would love to keep my files. -- Aizen Also double kudos if someone ...

Create Stored Procedure from Passthrough-SQL
I have a Passthrough-SQL routine that reads a text file (one CREATE statement for Stored Procedure).The routine work for one Stored Procedure. The routine dont work if the text file has 2 o more Create Statement. Any idea? Thanks, Cesar Cesar, You could have been a bit more detailed beyond "don't work" in your description. So without any further details, my guess is "make sure your create procedure statements are not separated by the "GO" statement". patrick developer support -- This posting is provided "AS IS" with no warranties, and c...

How create custom push buttons...
hi i have to create custom push button on OnInitDialog() Code is .... CButton *pBtn; //declared as public class member pBtn->Create(_T("My button"), WS_CHILD|WS_VISIBLE|BS_PUSHBUTTON, CRect(10,10,100,30), this, 1); but this does not create the button , means not show on the dialog, could anybody please help me out... Mujtaba Nothing looks out of place here. I am guessing that you allocated memory for pBtn before using Create on it. Why are you not adding the button on the Dialog in resource editor? ------------ Ajay Kalra ajaykalra@yahoo.com Mujtaba wrote: > hi...

Quick Links in Customize HomePage can't get Fixed Asset reports
When you click on Customize This Page. Quick Links, Add, Microsoft Dynamics GP window, Reports, Fixed Assets, there is nothing to add. There doesn't seem to be a way to get the FA reports on the home page. We can use the shortcut bar, however. ---------------- This post is a suggestion for Microsoft, and Microsoft responds to the suggestions with the most votes. To vote for this suggestion, click the "I Agree" button in the message pane. If you do not see the button, follow this link to open the suggestion in the Microsoft Web-based Newsreader and then click "I Ag...

Custom format for scientific notation
Hello, I have a spreadsheet in which I would like one value to always be displayed in scientific notation with E6. The number gets put into a nomograph which uses values in the millions, so it's easiest to see if my value is written this way. Example: 1,234 would display as 0.001234E6 I've tried ##0.00E0, but if the value is less than 100,000 it displays as E3. Any ideas? Thanks! Melinda As long as you don't have any values greater than or equal to 1E9, you can fake it: Format/Cells/Number/Custom [<1000000]\0\.000000\E+6;##0.000000E+0 In article <C3991959-6...