Bug 28269 - Problem with String.Format in PCL
Summary: Problem with String.Format in PCL
Status: RESOLVED NOT_REPRODUCIBLE
Alias: None
Product: Class Libraries
Classification: Mono
Component: System ()
Version: unspecified
Hardware: PC Windows
: Normal normal
Target Milestone: Untriaged
Assignee: Bugzilla
URL:
Depends on:
Blocks:
 
Reported: 2015-03-20 16:04 UTC by Alessandro
Modified: 2016-04-12 09:57 UTC (History)
6 users (show)

Tags:
Is this bug a regression?: ---
Last known good build:

Notice (2018-05-24): bugzilla.xamarin.com is now in read-only mode.

Please join us on Visual Studio Developer Community and in the Xamarin and Mono organizations on GitHub to continue tracking issues. Bugzilla will remain available for reference in read-only mode. We will continue to work on open Bugzilla bugs, copy them to the new locations as needed for follow-up, and add the new items under Related Links.

Our sincere thanks to everyone who has contributed on this bug tracker over the years. Thanks also for your understanding as we make these adjustments and improvements for the future.


Please create a new report on GitHub or Developer Community with your current version information, steps to reproduce, and relevant error messages or log files if you are hitting an issue that looks similar to this resolved bug and you do not yet see a matching new report.

Related Links:
Status:
RESOLVED NOT_REPRODUCIBLE

Description Alessandro 2015-03-20 16:04:41 UTC
I would like to do a Currency Format String using something like this

String.Format ("Qtà: {0} - Prz.: {1:C} - Imp. {2:C}", Quantita, PrezzoNetto, Importo);

PrezzoNetto is a Decimal with, for example 333.333

But the "Format" return the same value "333.333", not converted in Currency...
Comment 1 Udham Singh 2015-03-24 10:28:27 UTC
I have checked this issue and observed that String.Format function works properly. Please refer the screencast :  http://www.screencast.com/t/uRIRluMUN8HQ

Could you please provide a screencast that demonstrate this issue along with complete build info, Xamarin.Forms version, application output and Zip Xamarin Logs.

You can get build info via 'Help > About Microswoft Visual Studio > Copy Info and paste it here' and Zip Xamarin Logs via 'Help > Zip Xamarin Logs'.

Environment Info : 

Xamarin.Forms.1.4.1.6347-pre2

Microsoft Visual Studio Professional 2013
Version 12.0.31101.00 Update 4
Microsoft .NET Framework
Version 4.5.50938

Xamarin   3.9.533.0 (66489f0)
Comment 2 Alessandro 2015-03-24 13:45:00 UTC
Hi, this is the screencast (is my first...)

http://www.screencast.com/t/p4nvHW5z


Xamarin Studio
Version 5.7.2 (build 7)
Installation UUID: 9fb461c3-c5dd-430d-b08d-c080626349d5
Runtime:
	Microsoft .NET 4.0.30319.34209
	GTK+ 2.24.22 (MS-Windows theme)
	GTK# 2.12.26

Xamarin.Android
Version: 4.20.0 (Indie Edition)
Android SDK: C:\Users\Alessandro\AppData\Local\Android\android-sdk
	Supported Android versions:
		2.1   (API level 7)
		2.2   (API level 8)
		2.3   (API level 10)
		3.1   (API level 12)
		4.0   (API level 14)
		4.0.3 (API level 15)
		4.1   (API level 16)
		4.2   (API level 17)
		4.3   (API level 18)
		4.4   (API level 19)
		5.0   (API level 21)
Java SDK: C:\Program Files\Java\jdk1.6.0_39
java version "1.6.0_39"
Java(TM) SE Runtime Environment (build 1.6.0_39-b04)
Java HotSpot(TM) Client VM (build 20.14-b01, mixed mode, sharing)

Build Information
Release ID: 507020007
Git revision: dcf3f486177d3e625349b51a8f3be807e3fa7712
Build date: 2015-02-24 05:29:53-05
Xamarin addins: ea7c65bb7876e4a876ab365208e94acdf8f330ef

Operating System
Windows 6.1.7601.65536
Comment 3 Alessandro 2016-04-08 19:14:37 UTC
I have no other info. It's a very old post with a very old XF release. It could be solved...
Comment 4 Marek Safar 2016-04-12 09:57:29 UTC
Closing.

If you can still reproduce it with the latest Mono version, please reopen and provide details of your current culture