I have created a Money class to save money values in different currencies. The class uses 3 letter ISO symbols to store currency types:
public class Money
{
public decimal Amount { get; set; }
public string Currency { get; set; }
}
Is there a way in C# to use this information, say 100.00 USD, and format it as "$100.00"? Only way I know of requires CultureInfo like this:
Amount.ToString("C", CultureInfo.CreateSpecificCulture("en-US"));
However this does not work with my Money class. Is there another solution? I am open to changing my Money class.
I have searched this site for similar questions (such as this), but couldn't find one that answers the above question.