I have to convert from Lei into euro by using string formatting for currency. My method is:
public static void ConvertFromRonEur()
{
//string amount = string.Format("{0:C}");
double result;
Console.WriteLine("Lei: ");
double quantity;
double euro = 0.22D;
quantity = double.Parse(Console.ReadLine());
result = quantity * euro;
Console.WriteLine(("{0:C} Euro"), result);
}
When I run the result is:
Lei:
10
$2,20 Euro
How can I have only the 2,20
Euro result, but to use the string formatting currency? Thank you.