Dispatcher.VerifyAccess Method

Determines whether the calling thread has access to the current Dispatcher object (dispatcher).

Namespace: Microsoft.SPOT
Assembly: Microsoft.SPOT.TinyCore (in microsoft.spot.tinycore.dll)

Syntax

[ConditionalAttribute]
public void VerifyAccess ()

Exceptions This method throws the exceptions listed in the following table.

Exception Condition
InvalidOperationException The calling thread does not have access to the current dispatcher.

Remarks

Only the thread that created the current dispatcher can access it. Note, however, that because this method is public, any thread can check to see whether it has access to the current dispatcher.

The difference between the CheckAccess and VerifyAccess methods is that CheckAccess returns false if the calling thread does not have access to the current dispatcher, whereas VerifyAccess throws an exception.

Version Information

Available in .NET Micro Framework version 2.0, 2.5

See Also

Reference

Dispatcher Class
Dispatcher Members
Microsoft.SPOT Namespace