Calls GetLock(), runs the specified Func, calls ReleaseLock() and then returns the value returned by the Func.
'Declaration
Public Overloads Function WithLock(Of )( _
ByVal As System.Func(Of TResult) _
) As
'Usage
Dim instance As WorkbookView
Dim func As System.Func(Of TResult)
Dim value As
value = instance.WithLock(Of TResult)(func)
public WithLock<>(
System.Func<TResult>
)
public function WithLock(
: System.Func
): ;
public function WithLock(
: System.Func
) : ;
public: WithLock<>(
System.Func<TResult*>*
)
public:
WithLockgeneric<typename >
(
System.Func<TResult^>^
)
Parameters
- func
- The function to run.
Type Parameters
- TResult
- The type of the result returned by 'func'.
Return Value
The value returned by 'func'.
Target Platforms: Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2