Answers for "how to check if a string contains only alphabets and space in c#"

C#
0

check if a string is only spaces c#

if (string.IsNullOrWhiteSpace(yourString))
{
  // the string is empty or only spaces
}
Posted by: Guest on July-29-2021
0

how to check that string has only alphabet in c#

Regex.IsMatch(input, @"^[a-zA-Z0-9]+$");
Posted by: Guest on September-11-2020

Code answers related to "how to check if a string contains only alphabets and space in c#"

C# Answers by Framework

Browse Popular Code Answers by Language