I would like to override the .ToString() function so that whenever I get a double it outputs only 5 digits after the decimal point.
How do I reffer to the object the .ToString is working on, inside the override function? In other words what shell I put instead of the XXX in the following code?
public override string ToString()
{
if (XXX.GetType().Name == "Double")
return (Math.Round(XXX, 5));
}