I have the following value in Double: 1000.0
Using the command:
string.Format(CultureInfo.GetCultureInfo("pt-BR"), "{0:C}", 1000.0);
I have the output: $ 1,000.00
My Doubt is, how to convert $ 1000 to double, ie get output 1000.0
I have the following value in Double: 1000.0
Using the command:
string.Format(CultureInfo.GetCultureInfo("pt-BR"), "{0:C}", 1000.0);
I have the output: $ 1,000.00
My Doubt is, how to convert $ 1000 to double, ie get output 1000.0
If you are using to view you can put as in the example below:
<DataGridTextColumn Header="Valor Fator" Binding="{Binding PendenciaValorFator, Mode=TwoWay, StringFormat=N, UpdateSourceTrigger=PropertyChanged}" IsReadOnly="False">
I believe you are doing the stringFormat and assigning a property to display on the screen, when what you have to do is to use the stringFormat in the view, so your property with the value 1000.0 will not change.