KnowledgeHub
Questions
Tags
Users
Search
Alex Rivera
|
Logout
Edit Question
Title
Body
I want to execute this code on the main thread in the WPF app and getting an error I can't figure out what is wrong: private void AddLog(string logItem) { this.Dispatcher.BeginInvoke( delegate() { this.Log.Add(new KeyValuePair<string, string>(DateTime.Now.ToLongTimeString(), logItem)); }); }
Tags (comma-separated)
Save Edits
Cancel