.ToString("c") location

Discussion in 'ASP .Net' started by =?Utf-8?B?U2VubmE=?=, Sep 16, 2006.

  1. Hi

    When you have something like this:

    decimal d = 17.4m;
    Response.Write(d.ToString("c"));

    The output becomes: 17,50 kr. If the culture is set to swedish.

    So my question is. Where in the framework is the class/function that does
    the rounding for each and every currency?

    Thanks
     
    =?Utf-8?B?U2VubmE=?=, Sep 16, 2006
    #1
    1. Advertising

  2. See http://msdn2.microsoft.com/en-us/library/system.globalization.aspx

    --
    HTH,

    Kevin Spencer
    Microsoft MVP
    Chicken Salad Surgery

    What You Seek Is What You Get.

    "Senna" <> wrote in message
    news:...
    > Hi
    >
    > When you have something like this:
    >
    > decimal d = 17.4m;
    > Response.Write(d.ToString("c"));
    >
    > The output becomes: 17,50 kr. If the culture is set to swedish.
    >
    > So my question is. Where in the framework is the class/function that does
    > the rounding for each and every currency?
    >
    > Thanks
    >
     
    Kevin Spencer, Sep 16, 2006
    #2
    1. Advertising

  3. I would also consider downloading Reflector (Lutz Roeder's tool) and looking
    at sysglobl.dll from the framework if you want to get even more information
    about the inner workings.

    --
    Gregory A. Beamer
    MVP; MCP: +I, SE, SD, DBA

    *************************************************
    Think outside of the box!
    *************************************************
    "Kevin Spencer" <> wrote in message
    news:...
    > See http://msdn2.microsoft.com/en-us/library/system.globalization.aspx
    >
    > --
    > HTH,
    >
    > Kevin Spencer
    > Microsoft MVP
    > Chicken Salad Surgery
    >
    > What You Seek Is What You Get.
    >
    > "Senna" <> wrote in message
    > news:...
    >> Hi
    >>
    >> When you have something like this:
    >>
    >> decimal d = 17.4m;
    >> Response.Write(d.ToString("c"));
    >>
    >> The output becomes: 17,50 kr. If the culture is set to swedish.
    >>
    >> So my question is. Where in the framework is the class/function that does
    >> the rounding for each and every currency?
    >>
    >> Thanks
    >>

    >
    >
     
    Cowboy \(Gregory A. Beamer\), Sep 16, 2006
    #3
  4. Thanks Gregory. Have now been looking thru all of sysglobl.dll but can find
    any actually code that shows how they are doing the currency rounding. Any
    tips.



    "Cowboy (Gregory A. Beamer)" wrote:

    > I would also consider downloading Reflector (Lutz Roeder's tool) and looking
    > at sysglobl.dll from the framework if you want to get even more information
    > about the inner workings.
    >
    > --
    > Gregory A. Beamer
    > MVP; MCP: +I, SE, SD, DBA
    >
    > *************************************************
    > Think outside of the box!
    > *************************************************
    > "Kevin Spencer" <> wrote in message
    > news:...
    > > See http://msdn2.microsoft.com/en-us/library/system.globalization.aspx
    > >
    > > --
    > > HTH,
    > >
    > > Kevin Spencer
    > > Microsoft MVP
    > > Chicken Salad Surgery
    > >
    > > What You Seek Is What You Get.
    > >
    > > "Senna" <> wrote in message
    > > news:...
    > >> Hi
    > >>
    > >> When you have something like this:
    > >>
    > >> decimal d = 17.4m;
    > >> Response.Write(d.ToString("c"));
    > >>
    > >> The output becomes: 17,50 kr. If the culture is set to swedish.
    > >>
    > >> So my question is. Where in the framework is the class/function that does
    > >> the rounding for each and every currency?
    > >>
    > >> Thanks
    > >>

    > >
    > >

    >
    >
    >
     
    =?Utf-8?B?U2VubmE=?=, Sep 16, 2006
    #4
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Luke Dalessandro
    Replies:
    0
    Views:
    633
    Luke Dalessandro
    Jan 15, 2006
  2. zxo102
    Replies:
    0
    Views:
    448
    zxo102
    Aug 1, 2006
  3. saiho.yuen
    Replies:
    3
    Views:
    549
    kaeli
    Sep 14, 2004
  4. John Bailo

    IE7 shows location even if location=no

    John Bailo, Jan 19, 2007, in forum: Javascript
    Replies:
    4
    Views:
    218
    OmegaJunior
    Mar 11, 2007
  5. Fergus McMenemie

    LibXML element->toString vs document->toString

    Fergus McMenemie, Jul 12, 2012, in forum: Perl Misc
    Replies:
    5
    Views:
    650
    Fergus McMenemie
    Jul 17, 2012
Loading...

Share This Page