Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
CurrentCulture
Message
De
07/05/2011 03:45:11
 
 
À
04/05/2011 12:47:30
Timothy Bryan
Sharpline Consultants
Conroe, Texas, États-Unis
Information générale
Forum:
ASP.NET
Catégorie:
Code, syntaxe and commandes
Titre:
Versions des environnements
Environment:
C# 4.0
OS:
Windows XP SP2
Divers
Thread ID:
01509427
Message ID:
01509932
Vues:
38
>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()); }
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform