TaskScheduler.TryExecuteTaskInline Method

This member can be used only by trusted applications. If you try to use this member in a partial-trust application, your code will throw a MethodAccessException exception. This member is security-critical, which restricts its use.


Determines whether the provided Task can be executed synchronously in this call, and if it can, executes it.

Namespace:  System.Threading.Tasks
Assembly:  mscorlib (in mscorlib.dll)


<SecurityCriticalAttribute> _
Protected MustOverride Function TryExecuteTaskInline ( _
    task As Task, _
    taskWasPreviouslyQueued As Boolean _
) As Boolean
protected abstract bool TryExecuteTaskInline(
    Task task,
    bool taskWasPreviouslyQueued


  • taskWasPreviouslyQueued
    Type: System.Boolean
    A Boolean denoting whether or not task has previously been queued. If this parameter is True, then the task may have been previously queued (scheduled); if False, then the task is known not to have been queued, and this call is being made in order to execute the task inline without queuing it.

Return Value

Type: System.Boolean
A Boolean value indicating whether the task was executed inline.

Version Information


Supported in: 5


For a list of the operating systems and browsers that are supported by Silverlight, see Supported Operating Systems and Browsers.