Answers for "c# tostring format currency"

C#
1

c# format decimal as currency

private decimal _amount;

public string FormattedAmount
{
    get { return string.Format("{0:C}", _amount); }
}
Posted by: Guest on October-21-2020
0

c# tostring currency

amount.ToString("C", CultureInfo.CurrentCulture)
Posted by: Guest on April-13-2021
0

vb.net tostring numeric format string

decimal value = 123.456m;
Console.WriteLine("Your account balance is {0:C2}.", value);
// Displays "Your account balance is $123.46."
Posted by: Guest on May-18-2020

C# Answers by Framework

Browse Popular Code Answers by Language