How to schedule the execution of a function in 5 seconds with VB.NET

1 Answer

0 votes
Imports System
Imports System.Threading
 
Class Program
	Public Shared Sub ExecuteFunction()
        Console.WriteLine("Sub executed!")
    End Sub
	
    Public Shared Sub Main()
        Console.WriteLine("Execution paused for 5 seconds...")
         
        Thread.Sleep(5000)
		ExecuteFunction()
    End Sub
	
End Class
 
 
' run:
'
' Execution paused for 5 seconds...
' Sub executed!
' 

 



answered Jun 24, 2025 by avibootz

Related questions

...