How do you create an Azure Function using C#?
Short answer: Visual Studio: File → New Project → Azure Functions → Choose Trigger → .NET 6/7 Example: HTTP-triggered function [FunctionName("HelloFunction")] public static IActionResult Run( [HttpTrigger(AuthorizationLevel.Function, "get", "post")] HttpRequest req, ILogger log) { log.LogInformation("C# HTTP trigger function processed a request."); string name = req.Query["name"];
Example code
return new OkObjectResult($"Hello, {name ?? "World"}!");
}
Real-world example (ShopNest)
Order-paid events go to Service Bus; an Azure Function sends the confirmation email asynchronously.
Say this in the interview
- Define — one clear sentence (the short answer above).
- Example — relate it to a project like ShopNest or your real work.
- Trade-off — when you would not use it.
Share this Q&A
Share preview image: https://www.toolliyo.com/images/toolliyo-logo.png