Hi,everyone,I want to get a string as '\u65e0\u6cd5' in TextBox,but when I
trace the program,I found that TextBox.Text=@"\u65e0\u6cd5",
But I want "\u65e0\u6cd5",not @"\u65e0\u6cd5".
I used TextBox.Text.ToArray(),the result:char[] chars =
{'\','u','6','5'....}.
I need char[] chars = {'\u65e0','\u6cd5'}
How should I do?Thanks. 3 2057
Simply use three backslashes:
char[] chars = {"\\\u65e0","\\\u6cd5"}
--
cody
[Freeware, Games and Humor] www.deutronium.de.vu || www.deutronium.tk
"HuYi" <hu*******@doit.net.cn> schrieb im Newsbeitrag
news:eu**************@TK2MSFTNGP12.phx.gbl... Hi,everyone,I want to get a string as '\u65e0\u6cd5' in TextBox,but when I trace the program,I found that TextBox.Text=@"\u65e0\u6cd5", But I want "\u65e0\u6cd5",not @"\u65e0\u6cd5". I used TextBox.Text.ToArray(),the result:char[] chars = {'\','u','6','5'....}. I need char[] chars = {'\u65e0','\u6cd5'} How should I do?Thanks.
HuYi <hu*******@doit.net.cn> wrote: Hi,everyone,I want to get a string as '\u65e0\u6cd5' in TextBox,but when I trace the program,I found that TextBox.Text=@"\u65e0\u6cd5", But I want "\u65e0\u6cd5",not @"\u65e0\u6cd5". I used TextBox.Text.ToArray(),the result:char[] chars = {'\','u','6','5'....}. I need char[] chars = {'\u65e0','\u6cd5'} How should I do?Thanks.
Just use
textBox.Text = "\u65e0\u6cd5";
What does your code look like now?
--
Jon Skeet - <sk***@pobox.com> http://www.pobox.com/~skeet
If replying to the group, please do not mail me too
DanaR <Da***@discussions.microsoft.com> wrote: The "@" is inserted when displaying the data to the debugger to signify that the string is a "constant".
No it's not. It's to signify that there's data in there which would
otherwise need escaping. For instance, if it displays
@"hello\there"
then that's a string with the words "hello" and "there" separated by a
backslash.
If it displays
"hello\there"
then that's a string with the words "hello" and "here" separated by a
tab.
--
Jon Skeet - <sk***@pobox.com> http://www.pobox.com/~skeet
If replying to the group, please do not mail me too This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
by: Trep |
last post by:
Hi there!
I've been having a lot of difficult trying to figure out a way to convert
a terminated char array to a system::string for use in Visual C++ .NET
2003.
This is necessary because I...
|
by: Ron |
last post by:
Greetings,
I am writing text to a multi line textbox on a timer as
follows:
txt1.AppendText(@"/* " + DateTime.Now.ToString() + "\n");
Here is what gets displayed
/* 1/1/2004 11:12:11 AM|
|
by: Dakkar |
last post by:
I want to make a password system like this
every character will have an equal character
for example a will be equal to g and b will be equal to f
when person writes ab it will change automaticly...
|
by: VB Programmer |
last post by:
What is the max # of char a textbox can handle?
Thanks!
|
by: CalSun |
last post by:
Hi all,
I try to save a multiline textbox into an sql field (nvarchar(1024)). As I
read it out and display, the text drops all the linefeed char.
Is there a way to cure this? Thank you all for...
|
by: scottiedog |
last post by:
Hi
How can I send a char to Textbox so that KeyPress event is called? I have a button and with a click I would like to send a char, e.g. "C", to the Textbox. But Textbox1_KeyPress is not catching...
|
by: Marc Robitaille |
last post by:
Hello,
I think it is a easy question but I don't have any clue how to do it...Is it
possible to replace the char that a user type in a textbox with an other one
in the OnKeyPress methode? My...
|
by: Matt Fondoble |
last post by:
I have a form with multiple textboxes, checkboxes and comboboxes bound to a
dataset in VB 2003. I was forced to change the database structure of a
field from bigint to char. After changing the...
|
by: vcbytes |
last post by:
I am having a problem with the following code:
System::Void button1_Click(System::Object^ sender, System::EventArgs^ e) {
String^ texts = textBox1->Text;
char *text =...
|
by: ryjfgjl |
last post by:
ExcelToDatabase: batch import excel into database automatically...
|
by: isladogs |
last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM).
In this month's session, we are pleased to welcome back...
|
by: ArrayDB |
last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
|
by: PapaRatzi |
last post by:
Hello,
I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
|
by: Defcon1945 |
last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
|
by: Shællîpôpï 09 |
last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
|
by: af34tf |
last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
|
by: Faith0G |
last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome former...
| |