Answers for "c# how to check if a number has 2 digits in it"

C#
2

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

if (str.All(char.IsDigit)) {
  Console.WriteLine("This string only contains numbers");
}
Posted by: Guest on November-08-2020
0

validate int have 3 digits c#

int X = 9;

string PaddedResult = X.ToString().PadLeft (3, '0'); // results in 009
Posted by: Guest on July-10-2020

Code answers related to "c# how to check if a number has 2 digits in it"

C# Answers by Framework

Browse Popular Code Answers by Language