I have method which create background thread to make some action. In this background thread I create object. But this object while creating in runtime give me an exception :
void Background_Method(object sender, DoWorkEventArgs e)
{
// Time Consuming operations without using UI elements
// Result of timeconsuming operations
var result = new object();
App.Current.Dispatcher.Invoke(new Action