C
Cosmin Prund
This is supposed to be very easy, only I did not find this in MSDN so I'll
ask here:
How do I enter a char constant using the char's ASCII number? Specifically I
want to be able to compare a char to one of CR, LF, TAB (i.e: char number
13, 10, 9).
I suppose there's a problem because c#'s char's are unicode and I'm talking
ascii codes, but there must be a way to do it!
If I wore programming Delphi I would simply say
<code>
const c = #13;
</code>
for a const representing CR.
And while I'm at it, how do I enter a constant integer using HEX notation or
BINARY? Again, if I wore programming Delphi I would do something like this:
<code>
const i = $1234;
</code>
ask here:
How do I enter a char constant using the char's ASCII number? Specifically I
want to be able to compare a char to one of CR, LF, TAB (i.e: char number
13, 10, 9).
I suppose there's a problem because c#'s char's are unicode and I'm talking
ascii codes, but there must be a way to do it!
If I wore programming Delphi I would simply say
<code>
const c = #13;
</code>
for a const representing CR.
And while I'm at it, how do I enter a constant integer using HEX notation or
BINARY? Again, if I wore programming Delphi I would do something like this:
<code>
const i = $1234;
</code>