My favourite feature with .Net and C# is that it's a static programming language. This is also the largest problem I have with .Net 5 - As in, its blessing also becomes its curse. Simply because sometime I need a bit more "dynamic nature" than that which .Net provides out of the box. However, .Net 5 has a lot of interesting features, allowing you to circumvent this, opening it up for a more "dynamic nature". Let me illustrate with an example C# HTTP API controller.
x
[Route("magic")]
public class EndpointController : ControllerBase
{
[HttpGet]
[Route("{*url}")]
public async Task<ActionResult> Get(string url)
{
/* Do interesting stuff with URL here */
}
}
Notice the [Route("{*url}")] parts in the above code? This tiny little detail implies that everything going towards "magic/xxx" will be resolved by the controller, and its "xxx" parts will end up becoming the url argument to our method.