C# has always been criticized for the “Hello World” ceremony. You needed a namespace, a class, and a static Main method just to print one line. C# 9 Top-Level Programs remove this requirement, bringing C# closer to scripting languages like Python for simple tasks and microservices. The New Entry Point Behind the Scenes The compiler […]
Read more →Category: Microsoft
Microsoft Corporation (NASDAQ: MSFT) is an American multinational corporation headquartered in Redmond, Washington, United States that develops, manufactures, licenses, and supports a wide range of products and services predominantly related to computing through its various product divisions. Established on April 4, 1975 to develop and sell BASIC interpreters for the Altair 8800, Microsoft rose to dominate the home computer operating system market with MS-DOS in the mid-1980s, followed by the Microsoft Windows line of operating systems.
Microsoft would also come to dominate the office suite market with Microsoft Office. The company has diversified in recent years into the video game industry with the Xbox and its successor, the Xbox 360 as well as into the consumer electronics and digital services market with Zune, MSN and the Windows Phone OS. The ensuing rise of stock in the company’s 1986 initial public offering (IPO) made an estimated three billionaires and 12,000 millionaires…
Source Generators in C# 9: Compile-Time Code Generation
Source Generators allow you to inspect code during compilation and generate new C# files on the fly. Unlike Reflection (runtime slow) or IL Weaving (complex), Source Generators are fast, debuggable, and integrated into Roslyn. How it Works Example: INotifyPropertyChanged Automate the boilerplate of MVVM. Key Takeaways Generators can **add** code, but cannot **modify** existing code. […]
Read more →.NET 5: Performance Improvements Deep Dive
.NET 5 is the fastest .NET version ever releases. The engineering team has gone through the runtime and libraries with a fine-toothed comb, optimizing everything from the impacts of the Garbage Collector (GC) to the internals of List<T>. Let’s look at the numbers. TechEmpower Benchmarks In the TechEmpower benchmarks (Round 19/20), .NET 5 performs exceptionally […]
Read more →.NET 5 is Here: The Complete Migration Guide
.NET 5 is the first step in the “One .NET” vision, unifying .NET Core and Mono. It drops the “Core” branding but keeps the Core architecture. This guide covers the migration from .NET Core 3.1, highlighting the breaking changes and performance wins. Project File Changes Update your TFM (Target Framework Moniker). Single File Applications .NET […]
Read more →gRPC-Web: Bringing gRPC to Browser Applications
gRPC is great for microservices, but browsers don’t support HTTP/2 trailers required for standard gRPC. **gRPC-Web** is the protocol adaptation that makes it possible. In .NET, we can now host gRPC-Web services natively alongside standard gRPC. Configuring .NET Server Client Consumption Key Takeaways No need for an external Envoy proxy anymore (though still valid). Performance […]
Read more →C# 9.0 Init-Only Setters: Immutable Object Initialization
Before C# 9, to make a property immutable, you had to use constructor injection. This broke object initializers (`new Obj { Prop = val }`). The `init` accessor solves this by allowing setting a property only during object initialization. The ‘init’ Keyword Why this matters for DTOs It allows for consistent, valid state without massive […]
Read more →