Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
CurrentCulture
Message
From
07/05/2011 03:45:11
 
 
To
04/05/2011 12:47:30
Timothy Bryan
Sharpline Consultants
Conroe, Texas, United States
General information
Forum:
ASP.NET
Category:
Coding, syntax and commands
Title:
Environment versions
Environment:
C# 4.0
OS:
Windows XP SP2
Miscellaneous
Thread ID:
01509427
Message ID:
01509932
Views:
37
>Hi All,
>
>What would be the difference in these in reality?
>
>
>
>In a WPF Application object
>Dispatcher.Thread.CurrentCulture
>
>In a class
>System.Threading.Thread.CurrentThread.CurrentCulture
>
>
>
>Will these basically be the same thing in the end?

I guess this is a WPF question and comes down to whether System.Threading.Thread.CurrentThread will be the same as Dispatcher.Thread - and the answer is no. e.g:
System.Diagnostics.Debug.WriteLine((Dispatcher.Thread == System.Threading.Thread.CurrentThread).ToString());

BackgroundWorker b = new BackgroundWorker();
b.DoWork += new DoWorkEventHandler(b_DoWork);
b.RunWorkerAsync();

void b_DoWork(object sender, DoWorkEventArgs e)
{ System.Diagnostics.Debug.WriteLine((Dispatcher.Thread == System.Threading.Thread.CurrentThread).ToString()); }
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform