c# - New Thread inside a Thread in WinRT -
i performing functionality in threadpool. inside thread, linq query executed. takes more time because, in query selects collection of class has bool property checked 2 collection.
collection.select(item => new myelement { isactive = this.checkisactive(collection1, collection2, item), value = item, name = item != null ? item.tostring() : "empty" }).tolist<myelement>();
checkisactive method----
private bool checkisactive(list<object> collection1, list<object> collection2, object item){ if (collection1.contains(item) && !collection2.contains(item)) return false; return true;}
can optimized? idea?
can use new thread above execution in new thread?
can use thread or await return type method?
Comments
Post a Comment