Search
 
SCRIPT & CODE EXAMPLE
 

CSHARP

Thread.Sleep() without freezing the UI

private void someMethod()
  TO
 private async void someMethod()
 await Task.Delay(milliseconds);

This makes it an asynchronous method and will run asynchronously from your UI thread.
Note that this is only supported in the Microsoft .NET framework 4.5 and higher.
Comment

PREVIOUS NEXT
Code Example
Csharp :: openiddect ef core table not creating 
Csharp :: afaik 
Csharp :: unity photon base onenable 
Csharp :: nunjucks if variable exists 
Csharp :: PUN 2 Network Transform View Jittery Movement 
Csharp :: get path revit linked unload 
Csharp :: keep sprites at fixed transform according to screen resolution unity 
Csharp :: C:UsersSherryDocumentssdata.dta 
Csharp :: switch case c# enum tostring 
Csharp :: change character velocity unity 
Csharp :: C# replace all . except last one 
Csharp :: creating weighted graph in c# 
Csharp :: export xml 
Csharp :: how to make continuous progress bar 
Csharp :: c# linq where value is max and one item 
Csharp :: c# run foreach loop x times 
Csharp :: internal static object ds 
Csharp :: .netstandard distinctby iqueryable 
Csharp :: C# how to stop user type into combobox 
Csharp :: Function delegate 
Csharp :: mac osx enable hidpi terminal 
Csharp :: C# is folder 
Csharp :: screenshot c# WinForms 
Csharp :: get first and last item list c# 
Csharp :: c# int cast error 
Csharp :: get image information using c# 
Csharp :: c# datagridview count value 
Csharp :: Create an array with random values c# 
Csharp :: make sprite invisible unity 
Csharp :: how to make the player look around in unity 3d 
ADD CONTENT
Topic
Content
Source link
Name
5+7 =