Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR CSHARP

c# cancellationtoken example

private static void Work(CancellationToken cancelToken)
{
    while (true)
    {
        if(cancelToken.IsCancellationRequested)
        {
            return;
        }
        Console.Write("345");
    }
}
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #cancellationtoken
ADD COMMENT
Topic
Name
5+5 =