Tag

Http Range Requests in ASP.NET Core

Posted by

Here’s a small code snippet to use Http Range Requests with ASP.NET Core butchered from this now outdated MSDN article: using System.IO; using System.Text; using Microsoft.AspNetCore.Mvc; namespace WebApiRangeTest.Controllers { [Route(“api/[controller]”)] [ApiController] public class RangeController : ControllerBase { private static readonly byte[] _content = Encoding.UTF8.GetBytes(“abcdefghijklmnopqrstuvwxyz”); public IActionResult Get() { MemoryStream stream = new MemoryStream(_content); if (stream == null) […]

Read more...

How to customise Visual Studio’s “Create and initialize field” to add the underscore

Posted by

Step 1 – Starting with the Tools menu item from the top navigation menu, navigate through the menus as follows: Tools > Options > Text Editor > C# > Code Style > Naming Step 2 – Click the green Plus icon to open the following dialogue box: Step 3 – Now add the following: Step […]

Read more...
Terry Butler