Answers for "check if a string contains only numbers and 10 numbers c#"

C#
3

if string contains number c#

"abc3def".Any(c => char.IsDigit(c));

// Or to make it shorter:
"abc3def".Any(char.IsDigit);
Posted by: Guest on August-23-2020
2

c# check if string is only letters and numbers

if (textVar.All(c => Char.IsLetterOrDigit(c))) {
    // String contains only letters & numbers
}
Posted by: Guest on May-19-2020

Code answers related to "check if a string contains only numbers and 10 numbers c#"

C# Answers by Framework

Browse Popular Code Answers by Language