ThreadHelper.ThrowIfOnUIThread Method (String)
Visual Studio 2015
Determines whether the call is being made on the UI thread ,and throws COMException(RPC_E_WRONG_THREAD) if it is.
Assembly: Microsoft.VisualStudio.Shell.14.0 (in Microsoft.VisualStudio.Shell.14.0.dll)
Parameters
- callerMemberName
-
Type:
System.String
The optional name of caller if a Debug Assert is desired if on the UI thread.
| Exception | Condition |
|---|---|
| COMException | Thrown with RPC_E_WRONG_THREAD when called on any thread other than the main UI thread. |
Show: