Can someone convert this easy to write (and read) string formatting routine into the "proper" String.Format
equivalent code?
Int32 power;
Single voltage;
Int32 kVA;
Double powerFactor;
powerFactor = power / kVA;
label1.Text =
DateTime.Now.ToString() + ": " +
power.ToString() + "W, " +
voltage.ToString() + "V "+
"(pf "+(powerFactor*100.0).ToString()+"%)";
//label1.Text = String.Format("{g}: {0:g}W, {0:g}V (p.f. {0:0%}%)",
// DateTime.Now, power, voltage, powerFactor);
i've spent about 10 minutes trying to use String.Format
; the person who documented it should be shot