Answers for "c# get first 3 digits in string"

C#
7

c# get first 5 characters of string

string result = str.Substring(0,5);
Posted by: Guest on August-20-2020
0

on in get first two digit start with two numbers c#

int firstdigit;
if (Value < 10)
     firstdigit = Value;
else if (Value < 100)
     firstdigit = Value / 10;
else if (Value < 1000)
     firstdigit = Value / 100;
else if (Value < 10000)
     firstdigit = Value / 1000;
else if (Value < 100000)
     firstdigit = Value / 10000;
else if (Value < 1000000)
     firstdigit = Value / 100000;
else if (Value < 10000000)
     firstdigit = Value / 1000000;
else if (Value < 100000000)
     firstdigit = Value / 10000000;
else if (Value < 1000000000)
     firstdigit = Value / 100000000;
else
     firstdigit = Value / 1000000000;
Posted by: Guest on July-10-2020

Code answers related to "c# get first 3 digits in string"

C# Answers by Framework

Browse Popular Code Answers by Language