Page 1 of 1

Templates are changed to use Bootstrap

Posted: Wed Jan 08, 2025 4:46 am
by aminaas1575
With the arrival of .NET 6.0, Microsoft has updated C# version 10.0. Here is a brief introduction to the contents of .NET 6.0 and C# 10.0, so that I can familiarize myself with these new features provided by Microsoft while writing the article. And think about how to achieve the goal of writing better programs all at once.


Hot reload will reload Razor, C#, and CSS files when they are changed during development. After Visualall Studio2022 is executed, you will see a flame hot reload function. In the past, when you changed C# files, you had to reload them. It cannot be reloaded until it is started, but now you only need to press the hot reload button, and you can even choose to automatically hot reload when the file is saved. This is a very convenient function when you need to repeatedly debug.
VS page
Minimal APIs have introduced Top-level statements in C 9.0, which will leave Main in the console application project with only simple Console.WriteLine("Hello World!");, and in C 10.0, it has nepal whatsapp phone number also been expanded to API Project, now you only need a few lines of code to create an ASP.NET Core project, but it should be noted that with the new writing method, you still need to understand what is omitted, such as using, namespace, etc.
Bootstrap 5.1 5.1 version
IAsyncDisposable adds IAsyncDisposable interface and is used in controllers, page models, and views
CSS isolation adds a new CSS isolation file (.cshtml.css) to isolate CSS to individual pages to increase maintainability and reduce style conflicts. Take MVC's Index.cshtml as an example, add Views/Index.cshtml. css
JavaScript Isolation New JavaScript isolation file (.cshtml.js) is added to isolate JavaScript from View. Taking Index.cshtml of MVC as an example, add Views/Index.cshtml.js
Performance improvements This time 6.0 has also made a lot of performance improvements. The following information comes from Microsoft’s official blog.