Click here to Skip to main content
15,916,692 members
Home / Discussions / C#
   

C#

 
GeneralRe: Text.Length Command Pin
asquaredtech9-Jan-09 19:05
asquaredtech9-Jan-09 19:05 
GeneralRe: Text.Length Command Pin
Guffa9-Jan-09 19:54
Guffa9-Jan-09 19:54 
GeneralRe: Text.Length Command Pin
Luc Pattyn9-Jan-09 9:31
sitebuilderLuc Pattyn9-Jan-09 9:31 
GeneralRe: Text.Length Command Pin
asquaredtech9-Jan-09 10:14
asquaredtech9-Jan-09 10:14 
GeneralRe: Text.Length Command Pin
Colin Angus Mackay9-Jan-09 10:24
Colin Angus Mackay9-Jan-09 10:24 
GeneralRe: Text.Length Command Pin
Luc Pattyn9-Jan-09 10:27
sitebuilderLuc Pattyn9-Jan-09 10:27 
AnswerRe: Text.Length Command Pin
Rutvik Dave9-Jan-09 10:32
professionalRutvik Dave9-Jan-09 10:32 
AnswerRe: Text.Length Command Pin
Henry Minute9-Jan-09 10:51
Henry Minute9-Jan-09 10:51 
Just in case you have not yet realised that the '\'s are not really in your text.
Try to think of it like this:
If you were writing to your mum about something Fred had said to you. You would write something like
and then Fred said "How long are you staying?"

now Fred did not say open-quote blah blah ... question mark close-quote

Those are punctuation marks and are used to indicate to the reader, that the words were spoken by someone and that they were asking a question.

In C# the compiler is the reader and the '\'s are punctuation marks, except we call them 'escape characters' and in C# they indicate a non-printable character is coming. In the case of '\' the compiler says to itself
"Ah, an escape character. I must treat the next character specially because it is not printable."
It doesn't do anything with the '\'s, it throws them away. So by the time your "Sending File....\r\n" reaches the TextBox it is only 18 characters long.

In the TextBoxs' Text property it is stored in memory as a series of numbers:

S e n d i n g F i l e . . . .
83, 101, 110, 100, 105, 110, 103, 32, 70, 105, 108, 101, 46, 46, 46, 46, 13, 10

32 is the number for space character.
13 is the character for Return
10 is the character for New Line.

I hope this helps you.

Henry Minute

If you open a can of worms, any viable solution *MUST* involve a larger can.

GeneralRe: Text.Length Command Pin
Colin Angus Mackay9-Jan-09 11:04
Colin Angus Mackay9-Jan-09 11:04 
GeneralRe: Text.Length Command Pin
Henry Minute9-Jan-09 11:28
Henry Minute9-Jan-09 11:28 
GeneralRe: Text.Length Command Pin
asquaredtech9-Jan-09 19:24
asquaredtech9-Jan-09 19:24 
GeneralRe: Text.Length Command Pin
Henry Minute9-Jan-09 23:45
Henry Minute9-Jan-09 23:45 
GeneralRe: Text.Length Command Pin
Luc Pattyn9-Jan-09 11:35
sitebuilderLuc Pattyn9-Jan-09 11:35 
GeneralRe: Text.Length Command Pin
Henry Minute9-Jan-09 11:36
Henry Minute9-Jan-09 11:36 
AnswerRe: Text.Length Command Pin
asquaredtech9-Jan-09 11:25
asquaredtech9-Jan-09 11:25 
GeneralRe: Text.Length Command Pin
Henry Minute9-Jan-09 11:33
Henry Minute9-Jan-09 11:33 
GeneralRe: Text.Length Command Pin
Colin Angus Mackay9-Jan-09 13:35
Colin Angus Mackay9-Jan-09 13:35 
GeneralRe: Text.Length Command Pin
Guffa9-Jan-09 17:24
Guffa9-Jan-09 17:24 
GeneralRe: Text.Length Command Pin
Henry Minute9-Jan-09 23:34
Henry Minute9-Jan-09 23:34 
GeneralOMG Pin
Luc Pattyn9-Jan-09 11:40
sitebuilderLuc Pattyn9-Jan-09 11:40 
GeneralRe: Text.Length Command Pin
Henry Minute9-Jan-09 12:22
Henry Minute9-Jan-09 12:22 
GeneralRe: Text.Length Command Pin
Colin Angus Mackay9-Jan-09 13:44
Colin Angus Mackay9-Jan-09 13:44 
GeneralRe: Text.Length Command Pin
asquaredtech9-Jan-09 19:13
asquaredtech9-Jan-09 19:13 
GeneralRe: Text.Length Command Pin
Guffa10-Jan-09 0:52
Guffa10-Jan-09 0:52 
AnswerRe: Text.Length Command Pin
Guffa9-Jan-09 17:34
Guffa9-Jan-09 17:34 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.