CodeVerge.Net Beta


   Explore    Item Entry   Register  Login  
Microsoft News
Asp.Net Forums
IBM Software
Borland Forums
Adobe Forums
Novell Forums




Can Reply:  No Members Can Edit: No Online: Yes
Zone: > NEWSGROUP > Asp.Net Forum > general_asp.net.faq_frequently_asked_questions Tags:
Item Type: NewsGroup Date Entered: 2/24/2006 4:48:41 PM Date Modified: Subscribers: 0 Subscribe Alert
Rate It:
NR
XPoints: N/A Replies: 0 Views: 101 Favorited: 0 Favorite
1 Items, 1 Pages 1 |< << Go >> >|
rmprimo
Asp.Net User
CultureInfo, CurrentCulture, CurrentUICulture stuff2/24/2006 4:48:41 PM

0

Here is complete low down with many undocumented goodies:

http://forums.asp.net/1080435/ShowPost.aspx

some additional little tidbits.

The CultureInfo.Equals method has now been changed in v2.0. It is no longer based on LCID. The IDE does not warn of that though, since it is not depricated.

So do not use LCID if you are creating a db of cultures.

CultureInfo which IMO should have been a struct, but it is not, may return unexpected results when comparing instances.

The == operator is not overloaded either.

CultureInfo ci1=new CuiltureInfo("en-US");
CultureInfo ci2=new CuiltureInfo("en-US");

What do you expect Response.Write((ci1==ci2).ToString()); would print out?

What about Response.Write(ci1.Equals(ci2).ToString());   ? 

So use the Equals method only.

Also poor support for generics. IComparable<CultureInfo>.CompareTo and IEquatable<CultureInfo>.Equals are not implemented. So it is confined to non-generic collections code. It is not abstract, but deriving from it in practice can create a whole bunch of new issues since so many controls use CultureInfo and not the descendant TweakedCultureInfo.


Regards,

Rob
Veni, vidi, v2.0
1 Items, 1 Pages 1 |< << Go >> >|


Free Download:




   
  Privacy | Contact Us
All Times Are GMT