If, after experimenting with the formats for ToString, you do not find any that satisfies your needs, then you can go back to the original question of "how to override ToString". Now, you cannot actually override it because overriding would require inheriting from double, which is not allowed. But you can instead create an extension method. You do that by adding a static method in a static class that takes "this double" as a parameter:
public static class MyExtenders
{
public static string ToStringWithMyFormat(this double d)
{
string s = d.ToString(); // Make changes here to format d in whichever way you want it
return s;
}
}
// Use it like this:
string t=total.ToStringWithMyFormat();