C#
VB
C++
Executes the specified delegate.
public static AsyncResult Execute(Action d)
Public Overloads Shared Function Execute( _ByVal d As Action _) As Leadtools.Dicom.Addin.AsyncResult
public:static Leadtools.Dicom.Addin.AsyncResult^ Execute(Action^ d)
d
The delegate to execute asynchronously.
The asynchronous result.
Executes an ansynchronous method.
using Leadtools.Dicom.AddIn;public void ThreadFunction(){for (int i = 0; i < 1000; i++){Console.WriteLine("Count: {0}", i);}}public void TestExecute(){AsyncResult r = AsyncHelper.Execute(new Action(ThreadFunction));//// Wait 1 second for the thread to finish.//r.Wait(1000);if (r.IsCompleted)Console.WriteLine("Completed");}
Imports Leadtools.Dicom.AddInPublic Sub ThreadFunction()For i As Integer = 0 To 999Console.WriteLine("Count: {0}", i)Next iEnd SubPublic Sub TestExecute()Dim r As AsyncResult = AsyncHelper.Execute(New Action(AddressOf ThreadFunction))'' Wait 1 second for the thread to finish.'r.Wait(1000)If r.IsCompleted ThenConsole.WriteLine("Completed")End IfEnd Sub
Raster .NET | C API | C++ Class Library | JavaScript HTML5
Document .NET | C API | C++ Class Library | JavaScript HTML5
Medical .NET | C API | C++ Class Library | JavaScript HTML5
Medical Web Viewer .NET
