c# get first number in int code example
Example 1: on in get first two digit start with two numbers c#
int firstDigit = (int)(Value / Math.Pow(10, (int)Math.Floor(Math.Log10(Value))));
Example 2: on in get first two digit start with two numbers c#
if (i >= 100000000) i /= 100000000;
if (i >= 10000) i /= 10000;
if (i >= 100) i /= 100;
if (i >= 10) i /= 10;