Skip to content

Instantly share code, notes, and snippets.

@admir-live
Last active September 6, 2023 08:37
Show Gist options
  • Select an option

  • Save admir-live/2b3fa2425d6396078f8dfb101f628b52 to your computer and use it in GitHub Desktop.

Select an option

Save admir-live/2b3fa2425d6396078f8dfb101f628b52 to your computer and use it in GitHub Desktop.
using System;
using System.Threading.Tasks;
public class Program
{
public static void Main()
{
Console.WriteLine("Starting main method.");
LogApiCall("API endpoint called.");
Console.WriteLine("Main method completed.");
Console.ReadLine();
}
public static async Task LogApiCall(string message)
{
await Task.Delay(2000); // Delay for 2 seconds to simulate the async operation
Console.WriteLine($"Logged: {message}");
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment