How To

How to get connectionstring from appsettings.json instead of being hardcoded in .NET Core
11/1/2024 1:59:23 PM  90

In .NET Core, it's a good practice to store your connection strings in the appsettings.json file instead of hardcoding them in your code.

How to fix 'System.Text.Json Deserialize() return empty values'
11/1/2024 1:23:37 PM  37

To fix issues where System.Text.Json.Deserialize() returns empty or default values, follow these steps.

How to display custom string for enum value in C#
10/29/2024 11:13:21 PM  70

In C#, you can display a custom string for enum values by using the Description attribute from the System.ComponentModel namespace.

How to launch browser and visit web site in C#
10/29/2024 3:42:29 PM  68

To launch a web browser and visit a website in C#, you can use the System.Diagnostics.Process class.

When should I use NVARCHAR Max?
10/29/2024 3:37:58 PM  101

Use NVARCHAR when column data sizes vary significantly. Opt for NVARCHAR(MAX) when the sizes are unpredictable and may exceed 4,000 byte-pairs.

How to Convert byte array to hex string in C#
10/29/2024 2:43:28 PM  52

To convert a byte array to a hex string in C#, you can use the BitConverter class or manually format each byte.

How to get the index of an element in C# LINQ
10/29/2024 2:23:51 PM  67

In C#, you can use LINQ to find the index of an element in a list by utilizing the Select method.

How to divide a integer and get decimal in C#
10/29/2024 4:29:17 AM  77

In C#, when you divide two integers using the / operator, the result is also an integer.

How to fix 'DevExpress.Images.ImageResourceCache.Default.GetImage' not working
10/28/2024 7:54:44 AM  42

If you're experiencing issues with DevExpress.Images.ImageResourceCache.Default.GetImage, here are some steps to resolve the problem.

How to convert byte array to an object in C#
10/28/2024 7:47:04 AM  32

To convert a byte array back to an object in C#, you can use deserialization.

How to convert an object to a byte array in C#
10/28/2024 7:42:49 AM  125

To convert an object to a byte array in C#, you can use serialization.

How to get index of element in array C# LINQ
10/25/2024 9:22:00 AM  80

To get the index of an element in an array using LINQ in C#, you can use the Select method along with Where to find the index.