Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6888837
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T06:04:41+00:00 2026-05-27T06:04:41+00:00

How do i convert an integer to a localized string in .NET? Exempli gratia:

  • 0

How do i convert an integer to a localized string in .NET?

Exempli gratia:

Int64 value = 12345678901;

value.ToString();  
   // returns "12345678901", should be "123,4567,8901"

value.ToString(CultureInfo.CurrentCulture);  
   // returns "12345678901", should be "123,4567,8901"

value.ToString(CultureInfo.CreateSpecificCulture("en-US")) 
   // returns "12345678901", should be "12,345,678,901"

value.ToString(CultureInfo.CreateSpecificCulture("fr-CH"))
   // returns "12345678901", should be "12'345'678'901"

value.ToString(CultureInfo.CreateSpecificCulture("te-IN"))
   // returns "12345678901", should be "12,34,56,78,901"

How do i convert an integer (or float) to a localized string in .NET?

Bonus Chatter

Unique list of number formats in the world:

  • 12 345 678 901
  • 12,34,56,78,901
  • 12,345,678,901
  • 12.345.678.901
  • 12?345?678?901
  • 123,4567,8901
  • 12’345’678’901

Additional bonus information where these culture settings can be found in .NET:

CultureInfo.CreateSpecificCulture("en-US").NumberFormat.NumberGroupSizes = { 3 }
CultureInfo.CreateSpecificCulture("en-US").NumberFormat.NumberGroupSeparator = ","

CultureInfo.CreateSpecificCulture("te-IN").NumberFormat.NumberGroupSizes = { 3, 2 }
CultureInfo.CreateSpecificCulture("te-IN").NumberFormat.NumberGroupSeparator = ","

CultureInfo.CreateSpecificCulture("te-IN").NumberFormat.NumberGroupSizes = { 3 }
CultureInfo.CreateSpecificCulture("te-IN").NumberFormat.NumberGroupSeparator = "'"
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-27T06:04:42+00:00Added an answer on May 27, 2026 at 6:04 am

    Use the “N” standard format specifier with a precision of 0.

    using System;
    
    class Test
    {
        static void Main() 
        {
            long value = 12345678901;
            string text = value.ToString("N0");
            Console.WriteLine(text);
        }
    }
    

    Result (on my UK machine):

    12,345,678,901
    

    That will take the current culture into account for various aspects. You can specify a culture separately, of course.

    Edit: Generalized form for specific cultures:

    value.ToString("N0", CultureInfo.CreateSpecificCulture("fr-CH"));
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I want to convert an integer value to a string with leading zeroes (if
Is there a way to convert an integer to a string in PHP?
how to convert string to integer?? for ex: 5328764,to int base 10 AB3F3A, to
we can convert character to an integer equivalent to the ASCII value of the
How do I convert a hex string to an integer? "0xffff" ⟶ 65535 "ffff"
I need to convert integer value into hexadecimal. I have done with some logical,
I have the following string which i need to convert to integer or bigint.
I can convert an integer into string using String s = + 4; //
I have a function to convert integer to string .The function is char *
How can i convert an integer ranging from 0 to 255 to a string

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.