>Sure, you need to be explicit about the assignment and cast that's all. Try
>this instead:
>
>
>char escape = (char)27;
>
Two more options:
char escape = '\x1B';
char escape = '\u001B';
Mattias
===
Mattias Sjögren
[EMAIL PROTECTED]
You can read messages from the DOTNET archive, unsubscribe
Eric Shiau [mailto:[EMAIL PROTECTED]] wrote:
> I need to put non-printable characters to char. e.g.,
>
> char escape=27; // which is Escape character
>
> above statement is valid on C/C++, but for C#, I got the
> following error
>
> error CS0031: Constant value '27' cannot be converted to a 'cha
This might be a very simple question, but I just cannot find solution
through any web tutorial.
I need to put non-printable characters to char. e.g.,
char escape=27; // which is Escape character
above statement is valid on C/C++, but for C#, I got the following error
error CS0031: Constant va