Answers for "get 1 digit value in c#"

C#
2

how to find how much digits in number c#

Math.Floor(Math.Log10(n) + 1);
//find how much digit in number
//decimal point will not be added
Posted by: Guest on October-21-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

C# Answers by Framework

Browse Popular Code Answers by Language