How To
Avoiding the Common Pitfalls of the == Operator in C#
By Tan Lee Published on Dec 27, 2024 410
If you encounter an issue with the equality operator (==), specifically when comparing values of different types, extra caution is needed.
How to prevent flicker in WinForms
By Tan Lee Published on Dec 27, 2024 497
If you often update the content of a WinForms Control, you may encounter a flickering problem, particularly when the data being displayed is large.
How to Remove Response Headers in IIS
By Tan Lee Published on Nov 09, 2024 809
To remove or modify ASP.NET server headers such as X-AspNet-Version and X-Powered-By, you can use different methods depending on your version of ASP.NET and which headers you want to modify.
Pass reference type using "ref"
By Tan Lee Published on Dec 27, 2024 323
When working with reference types in C#, passing them to methods allows modifications to the object’s properties within the method.
Cannot Initialize a By-Reference Variable with a Value
By Tan Lee Published on Dec 27, 2024 347
With the introduction of "ref return" in C# 7.0, developers can now return a reference to a value from a method.
Curly Braces in string.Format in C#
By Tan Lee Published on Nov 10, 2024 505
In C#, if you want to use curly braces ({ and }) as literal characters within a string.Format() method, you need to escape them by doubling the braces.
C# Union
By Tan Lee Published on Dec 27, 2024 424
In C/C++, a union is a user-defined type where all its members share the same memory location.
How to check the size of HTTP resource in C#
By Tan Lee Published on Dec 27, 2024 440
The HTTP HEAD command is useful when we want to know the size of a resource, like a video or an image, before downloading it.
How to check internet connectivity in C#
By Tan Lee Published on Dec 27, 2024 487
The method NetworkInterface.GetIsNetworkAvailable() in .NET, available since version 2.0, checks if a network connection is available.
How to convert long date to short date in C#
By Tan Lee Published on Nov 10, 2024 576
In C#, you can convert a long date string (e.g., "Monday, October 10, 2024") to a short date string (e.g., "10/10/2024") using the DateTime class and its formatting capabilities.
How to compress dataset to byte array in C#
By Tan Lee Published on Aug 29, 2024 762
To compress a dataset into a byte array in C#, you can use various compression libraries available in .NET.
Remote WebDriver in C#
By Tan Lee Published on Dec 27, 2024 598
Selenium allows you to automate browsers on remote computers when a Selenium Grid is set up.