Topics

Csharp String

About this topic: Articles tagged __TAG__

Showing 62 articles

Topics

Articles

Showing 62 articles

How-tos How to Validate Email Address in C# There are 2 main methods that can be used to validate an email address in C#, the MailAddress class and the EmailAddressValidator class. How-tos How to Get the First Character of a String in C# There are several methods that can be used to get the first character of a string variable in C#. How-tos How to Count Occurrences of a Character Inside a String in C# There are 3 main methods that can be used to calculate the number of occurrences of a character inside a string variable in C#, the linq method, the String.Split() function and the … How-tos How to Generate Random Alphanumeric Strings in C# There are 3 main methods that can be used to generate random alphanumeric strings in C#, the Random class, the LINQ method, and the RNGCryptoServiceProvider class. How-tos How to Add String to an Array in C# There is no built-in method to dynamically add new elements to a completely filled array in C#. How-tos How to Remove First Character From String in C# There are two main methods that can be used to remove the first character from a string in C#, the String.Remove() method and the String.Substring() method. We can also achieve the … How-tos How to Format a String to Currency in C# There are two main methods that can be used to format a string to currency format in C#, the String.Format() and the ToString() functions. How-tos How to Check Palindrome String in C# There are two main methods that can be used to check whether a string is a palindrome or not in C#, the String.Substring() method and the LINQ method. How-tos How to Repeat String in C# There are three main methods that can be used to repeat a string in C#, the String constructor, the Enumerable.Repeat() function in LINQ, and the StringBuilder class. How-tos How to Repeat String X Times in C# In this article, we will explore five different methods to repeat a string x times in C# and discuss when to use each one. How-tos How to Efficiently Remove All Whitespaces From a String in C# This how-to article shows different methods to efficiently remove all whitespaces from a string in C#. It introduces methods like Regex.Replace(), String.Replace() and Where method How-tos How to Convert Byte Array to String in C# This how-to article shows different methods to convert a byte array to a string in C#. It introduces methods like Encoding.GetString() and MemoryStream How-tos How to Convert String to Datetime in C# This C# string to datetime how-to article shows different methods to convert a string to datetime in C#. It introduces methods like Convert.ToDateTime() method, DateTime.Parse() … How-tos How to Convert a String to Float in C# This article introduces how to convert a string to float in C#. It includes the Parse() method and ToDouble() method. How-tos How to Convert a String to Boolean in C# This article introduces how to convert a string to boolean in C#. It includes ToBoolean() method and TryParse() method. How-tos How to Format a String With Fixed Spaces in C# This tutorial explains how to format a string with fixed spaces or padding in C#. How-tos How to Add a Tab to a String in C# The escape character can be used to add a tab inside a string variable in C#. How-tos How to Escape Double Quotes in C# There are various methods that can be used to escape double quotes in C#. How-tos How to Compare Two Strings by Ignoring Case in C# There are several methods that can be used to perform case-insensitive string comparison in C#, the String.ToUpper(), String.ToLower(), String.Equals(), and String.Compare(). How-tos How to Truncate a String in C# We will discuss different methods on how to truncate a string in C#. How-tos How to Convert String to Hex in C# There are various methods that can be used to convert a string to hexadecimal format in C#, and we will discuss them all here. How-tos How to Convert Enum to String in C# There are two main methods that can be used to convert an enum to a string in C#, the Description attribute, and the switch method. How-tos How to Convert String Array to String in C# In this article we'll learn how to convert a string array to a single string in C#. How-tos How to Format a String as a Telephone Number in C# This article explains how to format a string as a telephone number in C#.

← All topics