Re: Newbie question on string operators in C#
- From: "Peter Morris" <peter[dot]morris(at)capableobjects.com>
- Date: Tue, 1 Apr 2008 13:16:47 +0100
If, say, s[i] evaluates to 'F', then how does C# treat (int) ('F' - 'A')?
Does it simply convert the two characters into their ASCII numbers,
thereby evaluating it to 5?
It would really only take a few seconds to do something like this
char a = 'A';
char f = 'F';
console.WriteLine("F - A = " + (f - a));
Pete
.
Relevant Pages
- Re: Get ASCII value for character when higher than 127
... By using the ascii values I am sure I can ... store special characters, also in a textfile. ... char timeString; ... strcat; ... (microsoft.public.vc.language) - Re: Reading Files and ASCII Code
... I understand correctly, it requires a char pointer, an integer value of the ... number of characters to input, and the character to stop at. ... As for the ASCII table, are you saying I should just phystically write ... (microsoft.public.vc.language) - Re: Reading Files and ASCII Code
... clue how to navigate this, take a certain number of characters at a time, etc. ... As for the ASCII loop, that seems to make an array filled with numbers from ... just make a char array of 127 and fill it in with a simple loop: ... What about moving the pointer in the file ... (microsoft.public.vc.language) - Re: How to socket and utf-8?
... The type char is merely a small integer, ... _characters_ and some _integers_. ... Since the integers of the ASCII ... character X encoded in UTF-8. ... (comp.unix.programmer) - Re: Reading Files and ASCII Code
... type char to work. ... what exactly am I going to use to select very specific numbers of characters ... As for the ASCII table, are you saying I should just phystically write ... pointer is now in the file"? ... (microsoft.public.vc.language) |
|