From: Nathan Sokalski on
VB.NET has a function, Asc(), that gets the Ascii value of a character. I am
attempting to find an equivelant function for C#. Can somebody help me here?
--
Nathan Sokalski
njsokalski(a)hotmail.com
http://www.nathansokalski.com/


From: Arne Vajhøj on
Nathan Sokalski wrote:
> VB.NET has a function, Asc(), that gets the Ascii value of a character. I am
> attempting to find an equivelant function for C#. Can somebody help me here?

(int)c

Arne

PS: I believe Asc is a VB6'ism.
From: "Mr. Arnold" MR. on

"Arne Vajh�j" <arne(a)vajhoej.dk> wrote in message
news:48659a67$0$90274$14726298(a)news.sunsite.dk...
> Nathan Sokalski wrote:
>> VB.NET has a function, Asc(), that gets the Ascii value of a character. I
>> am attempting to find an equivelant function for C#. Can somebody help me
>> here?
>
> (int)c
>
> Arne
>
> PS: I believe Asc is a VB6'ism.

Asc() can still be used VB.Net. It was in VB3-VB6 and QuickBasic too.

From: Fred on
Dans : news:OSp7aGO2IHA.5512(a)TK2MSFTNGP06.phx.gbl,
Mr. Arnold �crivait :
> "Arne Vajh�j" <arne(a)vajhoej.dk> wrote in message
> news:48659a67$0$90274$14726298(a)news.sunsite.dk...
>> Nathan Sokalski wrote:
>>> VB.NET has a function, Asc(), that gets the Ascii value of a
>>> character. I am attempting to find an equivelant function for C#.
>>> Can somebody help me here?
>>
>> (int)c
>>
>> Arne
>>
>> PS: I believe Asc is a VB6'ism.
>
> Asc() can still be used VB.Net. It was in VB3-VB6 and QuickBasic too.

But it's not equivalent to Arne's solution as it returns windows default
encoding character code (not Unicode value)

--
Fred
foleide(a)free.fr

From: Fred on
Dans : news:ePaA8NO2IHA.6096(a)TK2MSFTNGP06.phx.gbl,
Fred �crivait :
> Dans : news:OSp7aGO2IHA.5512(a)TK2MSFTNGP06.phx.gbl,
> Mr. Arnold �crivait :
>> "Arne Vajh�j" <arne(a)vajhoej.dk> wrote in message
>> news:48659a67$0$90274$14726298(a)news.sunsite.dk...
>>> Nathan Sokalski wrote:
>>>> VB.NET has a function, Asc(), that gets the Ascii value of a
>>>> character. I am attempting to find an equivelant function for C#.
>>>> Can somebody help me here?
>>>
>>> (int)c
>>>
>>> Arne
>>>
>>> PS: I believe Asc is a VB6'ism.
>>
>> Asc() can still be used VB.Net. It was in VB3-VB6 and QuickBasic
>> too.
>
> But it's not equivalent to Arne's solution as it returns windows
> default encoding character code (not Unicode value)

PS : Arne's solution is equivalent to AscW

--
Fred
foleide(a)free.fr