[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

Need to parse textbox values into an array of characters in Visual C #

Posted on 2009-02-17
1
Medium Priority
?
387 Views
Last Modified: 2012-05-06
I wish to assign the individual characters  in a textbox into an array of characters, buffer2 as follows:

I have the following textbox which has the value, "PLAIN" in it. I wish to assign each character in it to an array of characters, buffer2 so that buffer[0] = 'P', buffer[1]= 'L', buffer[2] = 'A' and so forth. Whatever I have tried, doesn't seem to work. Can someone show me a way to get it done? I either get index "out of bounds" error or  "cannot assign string to character" error.

Please help! Thanks.

0
Comment
Question by:geeta_m9
1 Comment
 
LVL 12

Accepted Solution

by:
ShazbotOK earned 2000 total points
ID: 23662612

char[] buffer = System.Text.ASCIIEncoding.ASCII.GetChars(
                System.Text.ASCIIEncoding.ASCII.GetBytes(MyString));

Open in new window

0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

We all know that functional code is the leg that any good program stands on when it comes right down to it, however, if your program lacks a good user interface your product may not have the appeal needed to keep your customers happy. This issue can…
High user turnover can cause old/redundant user data to consume valuable space. UserResourceCleanup was developed to address this by automatically deleting user folders when the user account is deleted.
Are you ready to place your question in front of subject-matter experts for more timely responses? With the release of Priority Question, Premium Members, Team Accounts and Qualified Experts can now identify the emergent level of their issue, signal…
Please read the paragraph below before following the instructions in the video — there are important caveats in the paragraph that I did not mention in the video. If your PaperPort 12 or PaperPort 14 is failing to start, or crashing, or hanging, …
Suggested Courses
Course of the Month19 days, 15 hours left to enroll

873 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question