Answers for "string.format currency c#"

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
1

c# format decimal as currency

private decimal? _amount;
// For nullable decimals
public string FormattedAmount
{
    get
    {
         return _amount == null ? "null" : string.Format("{0:C}", _amount.Value);
    }
}
Posted by: Guest on October-21-2020
0

format of money value in c#

Type typeToCreate = typeof(Headers);
ConstructorInfor ctor = typeToCreate.GetConstructor(System.Type.EmptyTypes);
object headers = ctor.Invoke(null);
Posted by: Guest on June-08-2021

C# Answers by Framework

Browse Popular Code Answers by Language