Blog

Solved: The destination thread no longer exists exception – C#

2016-11-08 You will get System.ComponentModel.InvalidAsynchronousStateException (The destination thread no longer exists.) if a UI component gets disposed or the UI thread EXITs while a different thread is in the middle of invoking a change on the same UI component. This usually happens when a user closes a window (form) that has been updated by aContinue reading “Solved: The destination thread no longer exists exception – C#”

Using multiple versions of Entity Framework in the same solution

2016/07/20 Using multiple versions of Entity framework by different projects within the same solution. I had to develop a pilot project to use Entity framework (EF) 6.0 inside the solution that already has other projects that refers to EF 4.4. While debugging I received this error: Could not load file or assembly ‘EntityFramework, Version=4.4.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089’Continue reading “Using multiple versions of Entity Framework in the same solution”

C# Reflection Code to Search Objects for Fields Properties and Methods and Get Values

2016-07-06 Code below will search for a given named property, field, or method inside a given object. It will search in below order: Properties Fields Methods It will continue to search until it finds a match that holds or returns (for methods) a non-null value. E.g. If you searched for “Name” and if there is a propertyContinue reading “C# Reflection Code to Search Objects for Fields Properties and Methods and Get Values”

When (or not) to Hyphenate Compound Adjectives

2016-07-06 Use hyphen only when the compound adjective comes before the noun. e.g. 1 – The candidate provided an up-to-date curriculum vitae. 2 – The curriculum vitae provided by the candidate was not up to date. References: dailywritingtips.com/adverbs-and-hyphens english.stackexchange.com

Trigger window.resize event via javascript

2016-06-15 Use below code to trigger window.resize event. This can be helpful to refresh some libraries like Chartist.js when a panel  or a div the control is contained in is expanded. P.S. The above method isn’t supported by Internet explorer (failed on IE 11), therefore use below method for wider browser support.

Loading…

Something went wrong. Please refresh the page and/or try again.


Follow My Blog

Get new content delivered directly to your inbox.

%d bloggers like this: