PC Review


Reply
 
 
Claudio
Guest
Posts: n/a
 
      11th Mar 2006
How to get the ascii character from a decimal value, in C#?

I have a decimal value 8 and it returns de ascci code from 8.


 
Reply With Quote
 
 
 
 
Sergey Bogdanov
Guest
Posts: n/a
 
      12th Mar 2006
char c = (char)8?


--
Sergey Bogdanov [.NET CF MVP, MCSD]
http://www.sergeybogdanov.com


Claudio wrote:
> How to get the ascii character from a decimal value, in C#?
>
> I have a decimal value 8 and it returns de ascci code from 8.
>
>

 
Reply With Quote
 
Max Schneider, Image Innovation
Guest
Posts: n/a
 
      12th Mar 2006
I found this in the help documentation:

Returns the character associated with the specified character code.


Public Function Chr(ByVal CharCode As Integer) As Char
Public Function ChrW(ByVal CharCode As Integer) As Char


Parameters
CharCode

Required. An Integer expression representing the code point, or character
code, for the character. If CharCode is outside the valid range, an
ArgumentException error occurs. The valid range for Chr is 0 through 255,
and the valid range for ChrW is -32768 through 65535.

Regards,

Max

"Sergey Bogdanov" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> char c = (char)8?
>
>
> --
> Sergey Bogdanov [.NET CF MVP, MCSD]
> http://www.sergeybogdanov.com
>
>
> Claudio wrote:
>> How to get the ascii character from a decimal value, in C#?
>>
>> I have a decimal value 8 and it returns de ascci code from 8.



 
Reply With Quote
 
Daniel Moth
Guest
Posts: n/a
 
      16th Mar 2006
Besides these being a VB thing and not C#, and while my memory is vague, I
recall something about them being slower than a manual implementation and
more importantly the CF implementation had slight differences from the
desktop implementation.

Cheers
Daniel
--
http://www.danielmoth.com/Blog/

"Max Schneider, Image Innovation" <(E-Mail Removed)> wrote in
message news:xJXQf.532$(E-Mail Removed)...
>I found this in the help documentation:
>
> Returns the character associated with the specified character code.
>
>
> Public Function Chr(ByVal CharCode As Integer) As Char
> Public Function ChrW(ByVal CharCode As Integer) As Char
>
>
> Parameters
> CharCode
>
> Required. An Integer expression representing the code point, or character
> code, for the character. If CharCode is outside the valid range, an
> ArgumentException error occurs. The valid range for Chr is 0 through 255,
> and the valid range for ChrW is -32768 through 65535.
>
> Regards,
>
> Max
>
> "Sergey Bogdanov" <(E-Mail Removed)> wrote in message
> news:(E-Mail Removed)...
>> char c = (char)8?
>>
>>
>> --
>> Sergey Bogdanov [.NET CF MVP, MCSD]
>> http://www.sergeybogdanov.com
>>
>>
>> Claudio wrote:
>>> How to get the ascii character from a decimal value, in C#?
>>>
>>> I have a decimal value 8 and it returns de ascci code from 8.

>
>



 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
ASCII Code Andre Microsoft ASP .NET 8 2nd Mar 2006 09:56 PM
Re: ascii code for vb Armin Zingler Microsoft VB .NET 0 15th May 2005 04:24 PM
DOS ASCII Code vs Windows ASCII Code??? Daniel Olivares Microsoft Windows 2000 Developer 0 6th Apr 2004 11:02 PM
ASCII code Abubakar Microsoft VB .NET 39 12th Feb 2004 01:37 PM
Re: ASCII code VManes Windows XP General 0 14th Aug 2003 05:51 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 11:05 AM.