Welcome to collectivesolver - Programming & Software Q&A with code examples. A website with trusted programming answers. All programs are tested and work.

Contact: aviboots(AT)netvision.net.il

Semrush - keyword research tool

Create your online store today with Shopify

Turn ChatGPT, Claude, Gemini, And CoPilot Into Your Personal Assistant, Business Coach, Content Creator, And More

AFFILIATE MARKETING Your all-in-one performance engine Manage affiliates, creators, and customer referrals in one unified platform—turning every partnership into measurable growth

Secure & Reliable Web Hosting, Free Domain, Free SSL, 1-Click WordPress Install, Expert 24/7 Support

Disclosure: My content contains affiliate links.

43,569 questions

56,787 answers

573 users

How to convert an integer to a string in base b with C#

1 Answer

0 votes
using System;

class IntegerToStringBase
{
    static void Main()
    {
        int number = 255; 
        int baseValue = 16; 

        // Convert integer to string in the specified base and make it uppercase
        string result = Convert.ToString(number, baseValue).ToUpper();

        Console.WriteLine($"Number in base {baseValue}: {result}");
    }
}



/*
run:

Number in base 16: FF

*/

 



answered Aug 17, 2025 by avibootz

Related questions

1 answer 192 views
192 views asked Mar 17, 2025 by avibootz
3 answers 311 views
311 views asked Feb 10, 2021 by avibootz
1 answer 183 views
1 answer 180 views
2 answers 221 views
...