2023-08-11 csharpdotnet C# How to wait for a process to end? Wait for a child process in C# with WaitForExit or WaitForExitAsync. Run a complete example covering exit codes, timeouts, cancellation, and cleanup on .NET 8 and 10.
2023-08-06 csharp C# 12 – Alias any type The using alias directive has been relaxed in C# 12 to allow aliasing any sort of type, not just named types. This means that you can now alias tuples, pointers, array types, generic types, etc. So instead of using the full structural form of a tuple, you can now alias it with a short descriptive…
2023-08-05 csharp Is there a C# With…End With statement equivalent? The With…End With statement in VB allows you to execute a series of statements that repeatedly refer to a single object. Thus the statements can use a simplified syntax for accessing members of the object. For example: Is there a C# syntax equivalent? No. There is not. The closest thing to it would be the…
2023-07-30 csharp C# 12 – Primary constructors Starting from C# 12, it is possible to define a primary constructor within classes and structs. The parameters are placed in parentheses right after the type name. The parameters of a primary constructor have a broad scope. They can be utilized to initialize properties or fields, serve as variables in methods or local functions, and…
2023-06-11 csharpdotnet How to start programming with C# A beginner's guide to getting started with C# programming, from setting up Visual Studio to writing your first program and finding learning resources.
2023-06-10 csharp What’s new in C# 12 An overview of new features in C# 12, including primary constructors, default lambda parameters, collection expressions, inline arrays, and more.
2023-06-10 csharp How to switch to C# 12 Fix C# 12 language version errors by updating your target framework to .NET 8 or setting LangVersion in your .csproj file.
2023-05-09 csharp C# 12 – Default values for parameters in lambda expressions C# 12 lets you specify default parameter values and params arrays in lambda expressions, just like in methods and local functions.
2023-03-21 csharp C# 11 – Generic attributes Learn how to define and use generic attributes in C# 11, including restrictions on type arguments and common error messages.
2023-03-18 csharp C# 11 – file access modifier & file-scoped types Learn how the C# 11 file access modifier restricts a type's scope to the file in which it is declared, helping avoid name collisions with source generators.