obtaining thread info

  • Thread starter Thread starter rodchar
  • Start date Start date
R

rodchar

hey all,
is there a way to get to Thread.CurrentThread.CurrentUICulture in my
webservice code?

thanks,
rodchar
 
hey all,
is there a way to get to Thread.CurrentThread.CurrentUICulture in my
webservice code?

Well yes, since every thread has a culture and a UI culture... and you
do it in precisely the way you've described. The question is, why?
CurrentUICulture is supposed to be used for purposes such as
formatting numbers & dates according to user preferences. A
webservice, by definition, has no UI, and it should certainly never
format anything in its XML response using UICulture!
 
thanks for the insight,
rod.

Pavel Minaev said:
Well yes, since every thread has a culture and a UI culture... and you
do it in precisely the way you've described. The question is, why?
CurrentUICulture is supposed to be used for purposes such as
formatting numbers & dates according to user preferences. A
webservice, by definition, has no UI, and it should certainly never
format anything in its XML response using UICulture!
 
Back
Top