Thanks to modern C# 5/6 🙂
public void foo()
{
Task.Delay(1000).ContinueWith(t=> bar());
}
public void bar()
{
// do stuff
}
More Related Contents:
- How can I do an average reverse in c#? [closed]
- I need help in meeting a certain criteria for a function in C#
- What’s wrong with my function? C# [closed]
- How do I round to the nearest 0.5?
- Should functions return null or an empty object?
- Local function vs Lambda C# 7.0
- C# Store functions in a Dictionary
- How to pass anonymous types as parameters?
- Why C# is not allowing non-member functions like C++
- Call C++ library in C# [closed]
- How to add a delay for a 2 or 3 seconds [closed]
- Dynamically invoking any function by passing function name as string
- Get the calling function name from the called function [duplicate]
- Populating a razor dropdownlist from a List in MVC
- Invalid attempt to read when no data is present
- Docking Window inside another Window
- C# RSA Public Key Output Not Correct
- Writing MemoryStream to Response Object
- Converting image to base64
- event Action vs event EventHandler
- Check for any element that exists in two collections
- How performant is StackFrame?
- Entity Framework Include() is not working
- MVC Attribute Routing Not Working
- How to get the text of a MessageBox when it has an icon?
- MSBuild to copy dynamically generated files as part of project dependency
- How to create many labels and textboxes dynamically depending on the value of an integer variable?
- Sign PDF with iTextSharp 5.3.3 and USB token
- Adding a select all shortcut (Ctrl + A) to a .net listview?
- The module was expected to contain an assembly manifest