How To
How to get int value from enum in C#
By Tan Lee Published on Nov 20, 2024 276
In C#, you can get the integer value of an enum by using a simple type cast.
Handling disk full errors when copying files in C#
By Tan Lee Published on Nov 20, 2024 223
You can use PInvoke to call the GetDiskFreeSpaceEx function from the Windows kernel to check the available disk space on both local and network drives.
How to create a search box in C# WinForms
By Tan Lee Published on Nov 20, 2024 611
Creating a search box for a Windows Forms application, similar to the one in the Windows 11.
How to add a resource as a bitmap to C# project in Visual Studio
By Tan Lee Published on Nov 20, 2024 982
Adding a bitmap or other resource to a C# project in Visual Studio 2022 involves a few steps, including embedding the resource and accessing it in your code.
How to get the color from a hexadecimal color code using .NET
By Tan Lee Published on Nov 20, 2024 583
To get the color from a hexadecimal color code in .NET, you can use the System.Drawing.ColorTranslator class or directly parse the value using methods provided by the .NET framework.
What's New in C# 13
By Tan Lee Published on Nov 19, 2024 409
C# 13, released with .NET 9, brings several new features designed to boost developer productivity and improve code efficiency.
How to read and write json file in c#
By Tan Lee Published on Nov 19, 2024 447
In C#, you can read and write JSON to a file using the System.Text.Json library.
How to convert string to JsonResult
By Tan Lee Published on Nov 19, 2024 576
In a typical ASP.NET MVC or Web API application, if you want to convert a string to a JsonResult, you can do so by creating a new JsonResult object and passing the string as the data.
How to fix PowerToys FancyZones in Windows 11
By Tan Lee Published on Nov 19, 2024 398
How to fix an issue where FancyZones (part of the PowerToys toolset) fails to work properly due to conflicts with Windows 11's built-in window management.
How to solve 'DbContextOptionsBuilder' does not contain a definition for 'UseSqlServer' in .NET Core
By Tan Lee Published on Nov 19, 2024 206
The error message 'DbContextOptionsBuilder' does not contain a definition for 'UseSqlServer' indicates that the necessary UseSqlServer extension method is not available in your project.
How to get datatype in JavaScript
By Tan Lee Published on Nov 16, 2024 178
In JavaScript, you can determine the data type of a value using a few different methods.
How to display GUI Message Boxes in PowerShell
By Tan Lee Published on Oct 09, 2024 674
In PowerShell, you can display a message box using the .NET Framework.