Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.
public string ConvertNumber(int Number)
{
if (Number >= 1000)
return string.Concat(Number / 1000, "k");
else
return Number.ToString();
}
string GetKNotation(long value)
{
string[] suffix = {"", "K","M", "B", "T"}; // what's after T?
int power = 3;
while (Math.Pow(10, power) < value)
power++;
power--; //was one greater than what we needed
return (value / (long)Math.Pow(10, power)).ToString() + suffix[power/3];
}
string GetKNotation(long value)
{
string[] suffix = {"", "K","M", "B", "T"}; // what's after T?
int power = 1;
while (Math.Pow(10, power) < value)
power++;
power--; //was one greater than what we needed
return (value / (long)Math.Pow(10, power)).ToString() + suffix[power/3];
}
string GetKNotation(long value)
{
string[] suffix = {"", "k","M", "G", "T" , "P", "E", "Z", "Y"}; // what's after Y?
int power = 0;
while (Math.Pow(10, power) < value)
power += 3;
power -= 3; //was one greater than what we needed
return (value / (long)Math.Pow(10, power)).ToString() + suffix[power/3];
}
If you are experiencing a similar issue, please ask a related question
Join the community of 500,000 technology professionals and ask your questions.