HomePosts tagged โ€œC# tips and Tricksโ€

C# tips and Tricks

Showing 1 - 20 of 28 results
This blog post will explain one of the new feature called Records that was introduced in C# 9.0. Records in...
In this C# tips and tricks blog post , we look at how to use String.Format function to display the...
Assume that you have a string in C# and you will need to extract the number from it, You can...
C# multiline string literal (@) is one of the feature which allows the c# developers to use @ symbol in...
Zip method in C# in an interesting extension method that lets the developers to join together two array sequences (IEnumerable)....
In one of my previous blog posts , we looked at converting c# object to Json string using the Newtonsoft.Json...
There are times when you might want to find out what is the last day of a given month in...
Do you want to get assembly version or assembly file version in your C# code?. This blog post exactly explains...
There are times when you want to get the attributes of the enum values from your C# code for some...
There are occassions where you might have to convert or encode a string to base64 and vice versa in C#....
You can easily convert the C# object to JSON string by using the Newtonsoft.Json NuGet package which is one of...
Do you have a requirement where you would need to count the number of words in a string in C#...
There are times when you are working on a console application in C# and you might want to get the...
Theย SqlConnectionStringBuilderย was introduced inย .NET 2.0ย that is used to build theย database connection stringย specific for theย SQL Server. The MSDN defines it as โ€œProvides...
If you are using Reflection and you wish you get property value using Reflection (string in this example) using C#,...
There are times when the developers would encounter scenarios where they need to generate a random alphanumeric string to be...
The Local Type Inference is also called as Implicitly Types Local Variables in C# and is an easy way to...
If you are using Dictionary and wondering how to sort it based on the value , you can pretty much...
Hereโ€™s a small tip on using theย string class better in C#ย to fill a string with specified repeated characters. You can...
Assume that you have a List of string and you wish you to get the items of the list into...