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 8302105
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 8, 20262026-06-08T17:12:04+00:00 2026-06-08T17:12:04+00:00

I have an int[] : RXBuffer[0], RXBuffer[1],…, RXBuffer[9] where each value represents an ASCII

  • 0

I have an int[]:

RXBuffer[0], RXBuffer[1],..., RXBuffer[9]

where each value represents an ASCII code, so 0x31 represents 1, 0x41 represents A.

How do I convert this to a 10 character string ?

So far I’ve tried Data = RxBuffer.ToString();. But it shows Data equals to System.Int32[] which is not what my data is.

How can I do this?

  • 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-06-08T17:12:06+00:00Added an answer on June 8, 2026 at 5:12 pm

    Assuming the “int array” is values in the 0-9 range (which is the only way that makes sense to convert an “int array” length 10 to a 10-character string) – a bit of an exotic way:

    string s = new string(Array.ConvertAll(RXBuffer, x => (char)('0' + x)));
    

    But pretty efficient (the char[] is right-sized automatically, and the string conversion is done just with math, instead of ToString()).


    Edit: with the revision that makes it clear that these are actually ASCII codes, it becomes simpler:

    string s = new string(Array.ConvertAll(RXBuffer, x => (char)x));
    

    Although frankly, if the values are ASCII (or even unicode) it would be better to store it as a char[]; this covers the same range, takes half the space, and is just:

    string s = new string(RXBuffer);
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have this code #define BUFFER_LEN (2048) static float buffer[BUFFER_LEN]; int readcount; while ((readcount
Let's say I have int a() { /* Tons of code ....*/ return someInt;
I have an int and float array each of length 220 million (fixed). Now,
I have a int variable witch holds the old battery value it is declared
I have an array, say int a[]={2,0,1,0,1,1,0,2,1,1,1,0,1,0,1}; I need to append each of the
suppose I have a type defined as type value = None | Int of
I have: int i=8; i.ToString(); if i do this i get 8 i want
if i have int win[][] ={{1,2,3},{4,5,6},{7,8,9},{1,4,7},{2,5,8},{3,6,9},{1,5,9},{3,5,7}}; Can I put condition in this way? if(((win[0][0])
I need to go through x number of objects. Each object will have (int)
If I have int x = 24 , how can I convert that into

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.