Search
 
SCRIPT & CODE EXAMPLE
 

CSHARP

c# check if string is only letters and numbers

if (textVar.All(c => Char.IsLetterOrDigit(c))) {
    // String contains only letters & numbers
}
Comment

c# how do you check if a string contains only digits

if (str.All(char.IsDigit)) {
  Console.WriteLine("This string only contains numbers");
}
Comment

PREVIOUS NEXT
Code Example
Csharp :: define a vector c# 
Csharp :: start command line from c# 
Csharp :: c# inline a function 
Csharp :: c# hex to console color 
Csharp :: unity how to stop the game 
Csharp :: Prevent player rotation unity 
Csharp :: compare two binary tree 
Csharp :: how to change loaded scene in unity 
Csharp :: c# streamwriter 
Csharp :: new color unity 
Csharp :: difference between while and do while in c# 
Csharp :: unity animator check if animation is playing 
Csharp :: hide datagrid column c# 
Csharp :: print array in c# 
Csharp :: dropdown wpf 
Csharp :: get time from datetime c# 
Csharp :: Find an item in a list by LINQ 
Csharp :: c# write variable in string 
Csharp :: c# create array 
Csharp :: mvc 5 dropdownlist 
Csharp :: palindrome number c# 
Csharp :: how to set the frame rate unity 
Csharp :: how to create a singleton in unity 
Csharp :: how to allow user import image c# 
Csharp :: add item to list c# 
Csharp :: unity reverse string 
Csharp :: how to verify the scene unity 
Csharp :: how to remove space between string in c# 
Csharp :: ienumerable count 
Csharp :: c# optional parameters 
ADD CONTENT
Topic
Content
Source link
Name
9+1 =