I\'m trying to use String.Format(\"{0:c}\", somevalue) in C# but am having a hard time figuring out how to configure the output to meet my needs. Here are my needs:
Depending on if you are consistently using the same data type for all of your currency values, you could write an extension method that would make it so that your case is always met. For example if you were using the decimal type:
public static string ToCurrencyString (this decimal value)
{
if (value == 0)
return String.Empty;
return value.ToString ("C");
}