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

  • Home
  • SEARCH
  • 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 912953
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 15, 20262026-05-15T17:28:18+00:00 2026-05-15T17:28:18+00:00

I have follow code to make a String to a CFString: internal static byte[]

  • 0

I have follow code to make a String to a CFString:

 internal static byte[] StringToCFString(string value)
    {
        byte[] b;

        b = new byte[value.Length + 10];
        b[4] = 0x8c;
        b[5] = 07;
        b[6] = 01;
        b[8] = (byte)value.Length;
        Encoding.ASCII.GetBytes(value, 0, value.Length, b, 9);
        return b;
    }

    public static byte[] StringToCString(string value)
    {
        byte[] bytes = new byte[value.Length + 1];
        Encoding.ASCII.GetBytes(value, 0, value.Length, bytes, 0);
        return bytes;
    }

How I can get a CFString to String back?
(C#.Net 2.0)

  • 1 1 Answer
  • 1 View
  • 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-15T17:28:18+00:00Added an answer on May 15, 2026 at 5:28 pm

    I would try something like this…

    Encoding.ASCII.GetString(value, 9, value.Length - 9);
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Ask A Question

Stats

  • Questions 525k
  • Answers 525k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer There are a couple of different things going on here.… May 16, 2026 at 10:11 pm
  • Editorial Team
    Editorial Team added an answer I'd be tempted to include a client-side index changed event… May 16, 2026 at 10:11 pm
  • Editorial Team
    Editorial Team added an answer This is called the placement new operator. It allows you… May 16, 2026 at 10:11 pm

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

Related Questions

Follow up to this question . I have the following code: string[] names =
Code snippet to follow. I have a struct (example code has class, tried both,
i have some HTML code saved in a PHP string $str = <font size=2
let's say I have public delegate DataSet AutoCompleteDelegate( string filter, long rowOffset); can I
Ever since reading Clean Code I have been trying to keep my code descriptive
I have some problem with UTF-8. My client (realized in GWT) make a request
this is a follow up to my recent question ( Code for identifying programming
I have just applied for a Java developer job and the recruiter told me
I'm learning how to code in Java after after coming from C. In C
Is there any authoritative reference about the syntax and encoding of an URL for

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.