How can I do Math.sqrt(); and get a set number of decimal places?
Example code (kind of):
Console.WriteLine(getSqrt(2, 100));
static string getSqrt(double inVal, int inLenght)
{
return ((Math.Sqrt(inVal)).ToString()); // inLenght is number of decimal places
}
Currently with math.Sqrt I get 13 decimal places, but I want to be able get 100 or 1000 or more, (also want it as string).
I have looked a bit at BigIntegers (System.Numerics) but idk.