dinero en C#
string.Format("{0:C1}", 112.236677) //$112.2
string.Format("{0:C3}", 112.236677) //$112.237
string.Format("{0:C4}", 112.236677) //$112.2367
string.Format("{0:C9}", 112.236677) //$112.236677000
dinero en C#
string.Format("{0:C1}", 112.236677) //$112.2
string.Format("{0:C3}", 112.236677) //$112.237
string.Format("{0:C4}", 112.236677) //$112.2367
string.Format("{0:C9}", 112.236677) //$112.236677000
dinero en C#
DECLARE
@money1 MONEY,
@money2 MONEY,
@money3 MONEY,
@money4 MONEY,
@decimal1 DECIMAL(19,4),
@decimal2 DECIMAL(19,4),
@decimal3 DECIMAL(19,4),
@decimal4 DECIMAL(19,4)
SELECT
@money1 = 1, @money2 = 3, @money3 = 10000,
@decimal1 = 1, @decimal2 = 3, @decimal3 = 10000
SET @money4 = (@money1/@money2) * @money3
SET @decimal4 = (@decimal1/@decimal2) * @decimal3
SELECT @money4 AS MoneyResult,
@decimal4 AS DecimalResult
dinero en C#
NumberFormatInfo nfi = new CultureInfo( "en-US", false ).NumberFormat;
nfi.CurrencyPositivePattern = 0;
nfi.CurrencyDecimalSeparator = "..";
string.Format(nfi, "{0:C}", 112.236677); //$112..24
dinero en C#
int priceInt = 1 + (14 / 3);
double priceDouble = 1 + (14f / 3);
decimal priceDecimal = 1 + (14m / 3);
dinero en C#
NumberFormatInfo nfi = new CultureInfo( "en-US", false ).NumberFormat;
nfi = (NumberFormatInfo) nfi.Clone();
nfi.CurrencySymbol = "?";
string.Format(nfi, "{0:C}", 112.236677); //?112.24
nfi.CurrencySymbol = "?%^&";
string.Format(nfi, "{0:C}", 112.236677); //?%^&112.24
dinero en C#
decimal decimalResult = 10 + 1.4m - 10;
double doubleResult = 10 + 1.4f - 10;
dinero en C#
string.Format("{0:c}", 112.236677) // $112.23 - defaults to system
dinero en C#
DECLARE
@money1 MONEY,
@money2 MONEY,
@money3 MONEY,
@money4 MONEY,
@decimal1 DECIMAL(19,4),
@decimal2 DECIMAL(19,4),
@decimal3 DECIMAL(19,4),
@decimal4 DECIMAL(19,4)
SELECT
@money1 = 1, @money2 = 3, @money3 = 10000,
@decimal1 = 1, @decimal2 = 3, @decimal3 = 10000
SET @money4 = (@money1 * @money3) / @money2
SET @decimal4 = (@decimal1 * @decimal3) / @decimal2
SELECT @money4 AS MoneyResult,
@decimal4 AS DecimalResult
dinero en C#
NumberFormatInfo nfi = new CultureInfo( "en-US", false ).NumberFormat;
nfi.CurrencyPositivePattern = 0;
string.Format(nfi, "{0:C}", 112.236677); //$112.24 - default
nfi.CurrencyPositivePattern = 1;
string.Format(nfi, "{0:C}", 112.236677); //112.24$
nfi.CurrencyPositivePattern = 2;
string.Format(nfi, "{0:C}", 112.236677); //$ 112.24
nfi.CurrencyPositivePattern = 3;
string.Format(nfi, "{0:C}", 112.236677); //112.24 $
dinero en C#
xxx.ToString("C")
Copyright © 2021 Codeinu
Forgot your account's password or having trouble logging into your Account? Don't worry, we'll help you to get back your account. Enter your email address and we'll send you a recovery link to reset your password. If you are experiencing problems resetting your password contact us