This post will provide a simple tip showing how you can get the last 4 characters from a string in C#.
How to get last four characters from a string in C#?
Assume that you have a string that contains …
This post will provide a simple tip showing how you can get the last 4 characters from a string in C#.
Assume that you have a string that contains …
Do you want to repeat a string N number of times in C# ? . You can use the string.concat and Enumerable.Repeat to achieve it in .NET Framework 4.0 and higher.
When using the string.contains method , the comparison is done based on the exact string that is passed as parameter. In this case , the comparison is case-sensitive.
using System; namespace ACConsoleApp { class Program { static void Main(string[] args)…
To populate the XDocument from a string in C# , we can use the Parse method defined in the XDocument class.
Below is a sample code snippet that demonstrates how to populate XDocument from string in C#.
Below is a sample code snippet that demonstrates how to write a string to the Output Windows in Visual Studio 2013.
using System; using System.Collections.Generic; using System.Data; using System.IO;
In one of the previous article , we explained how to get the maximum value from a list of integer using LINQ query in C# . What happens when the column is a string instead of integer ?. Below are …
One of the simplest way to remove non alphanumeric characters from a string is using the regular expressions . Below is a sample code snippet that demonstrates how to delete the non alphanumeric characters from a string in C#.
Do you want to find the number of occurrences of a string within a string in C#? This article will explain how to do it.
For example, assume …
Want to join the items inside the string array say with, delimiter using LINQ in C#? It’s pretty easy.
Below is a sample code snippet demonstrating in easy steps on how to concatenate a string array using LINQ in C#?…
Below is a sample code snippet demonstrating on how to reverse a string in C#?
string str = "Abundantcode"; char[] cArray = str.ToCharArray(); Array.Reverse(cArray);