C#

Moderators: None (Apply to moderate this forum)
Number of threads: 2720
Number of posts: 5746

This Forum Only
Post New Thread
Single Post View       Linear View       Threaded View      f

Report
Euro Posted by doncu on 28 Oct 2004 at 2:55 PM
I use the Euro symbol as the default currency in Windows.
When I attempted to use it in C# all I get is the ? symbol.

Any ideas
Report
Re: Euro Posted by Baldusarius on 29 Oct 2004 at 4:05 PM
In what way did you attempt to use it? I'm guessing whatever you were doing was using an encoding other than Unicode.
Report
Re: Euro Posted by doncu on 30 Oct 2004 at 2:02 PM
: In what way did you attempt to use it? I'm guessing whatever you were doing was using an encoding other than Unicode.
:
I attemped to use it using programs from the Microsoft site.
Using the Unicode 20Ac
Report
Re: Euro Posted by Baldusarius on 31 Oct 2004 at 7:14 PM
Only guesses can be offered unless you provide some details.
Report
Re: Euro Posted by doncu on 1 Nov 2004 at 2:12 PM
: Only guesses can be offered unless you provide some details.
:
I have tried the following program from Microsoft's site.
using System;
using System.Golbalizition;
public class TestClass {
public static void Main() {
int = 100;
CultureInfo x = new CultureInfo("en-IE");
Console.WriteLine( i.ToString("c",IE))
}
}
I still get ? instead of
Report
Re: Euro Posted by Baldusarius on 2 Nov 2004 at 8:02 AM
The best way to post code samples in messageboards is to copy and paste. You can then remove the lines that are not pertinent. That avoids the situation that the person trying to offer assistance has to guess at what you meant to get your sample to even compile.

I'm assuming that the unnamed int in your code should be "i" and that the ToString method should have been passed x (the CultureInfo object) as the second parameter instead of IE (which I have no clue about). With those changes made, the correct symbol is printed to the console.


: : Only guesses can be offered unless you provide some details.
: :
: I have tried the following program from Microsoft's site.
: using System;
: using System.Golbalizition;
: public class TestClass {
: public static void Main() {
: int = 100;
: CultureInfo x = new CultureInfo("en-IE");
: Console.WriteLine( i.ToString("c",IE))
: }
: }
: I still get ? instead of
:

Report
Re: Euro Posted by doncu on 3 Nov 2004 at 6:38 PM
: The best way to post code samples in messageboards is to copy and paste. You can then remove the lines that are not pertinent. That avoids the situation that the person trying to offer assistance has to guess at what you meant to get your sample to even compile.
:
: I'm assuming that the unnamed int in your code should be "i" and that the ToString method should have been passed x (the CultureInfo object) as the second parameter instead of IE (which I have no clue about). With those changes made, the correct symbol is printed to the console.
:
:
: : : Only guesses can be offered unless you provide some details.
: : :
: : I have tried the following program from Microsoft's site.
: : using System;
: : using System.Golbalizition;
: : public class TestClass {
: : public static void Main() {
: : int = 100;
: : CultureInfo x = new CultureInfo("en-IE");
: : Console.WriteLine( i.ToString("c",IE))
: : }
: : }
: : I still get ? instead of
: :
: Sorry about the mistakes.
The en-IE is to get the Irish Euro
: using System;
using System.Globalization;

namespace Currency1
{

public class TestClass
{

public static void Main()
{
int i = 100;
CultureInfo ir = new CultureInfo("en-IE");
Console.WriteLine(i.ToString("c",ir));
}
}
}




 

Recent Jobs

Official Programmer's Heaven Blogs
Web Hosting | Browser and Social Games | Gadgets

Popular resources on Programmersheaven.com
Assembly | Basic | C | C# | C++ | Delphi | Flash | Java | JavaScript | Pascal | Perl | PHP | Python | Ruby | Visual Basic
© Copyright 2011 Programmersheaven.com - All rights reserved.
Reproduction in whole or in part, in any form or medium without express written permission is prohibited.
Violators of this policy may be subject to legal action. Please read our Terms Of Use and Privacy Statement for more information.
Operated by CommunityHeaven, a BootstrapLabs company.