c# - Identity comparisons of `CultureInfo` objects retrieved using `CultureInfo.GetCultureInfo` -



c# - Identity comparisons of `CultureInfo` objects retrieved using `CultureInfo.GetCultureInfo` -

is safe compare cultureinfo objects retrieved cultureinfo.getcultureinfo using identity operator (==) ?

in other words, cache guaranteed homecoming same objects, or possible might drop entries , recreate them new objects @ later point?

note documentation overloads isn't helpful in regard, , alternative of course of study utilize object.equals method.

no.

there comment in source of private helper method overloads reads:

// there race status in code side effect sec thread's value // clobbers first in dictionary. acceptable ---- since cultureinfo objects // content equal (but not reference equal). since create no guarantees there, ---- // acceptable.

funny felt need censor word "hack".

c# .net locale cultureinfo culture

Comments

Popular posts from this blog

php - Android app custom user registration and login with cookie using facebook sdk -

django - Access session in user model .save() -

php - .htaccess Multiple Rewrite Rules / Prioritizing -