Quote:
Originariamente inviato da SpyroTSK
Codice:
string Model = "Google Pixel Watch";
decimal Money = 0.0m;
decimal Production_Price = 100.0m;
decimal StandardInflation = 100.0m;
if (Model.Contains("Pixel")) {
Money = Production_Price + StandardInflation + 200.0m;
} else {
Money = Production_Price + StandardInflation;
}
if (CultureInfo.CurrentCulture.ToString().Contains("it-IT")) {
PriceLabel.Text = Money.ToString() + " €";
} else
{
PriceLabel.Text = Money.ToString() + " $";
}
|
C'è un bug, l'Euro non si usa solo in Italia, va usato cultureInfo.NumberFormat.CurrencySymbol in luogo del simbolo schiantato.