Click here to Skip to main content
16,020,701 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
hi

what is the equivalent of this code in c#

this code is is in VB6


Chr$(Asc("0")



thanks
Posted
Updated 17-May-10 5:52am
v2
Comments
Sandeep Mewara 17-May-10 12:00pm    
Why posting it at multiple forums?

The equivalent of Chr$(Asc("0")) in any language is...

wait for it...

"0" (as a string)



That code does nothing but get the ascii value for the string "0" which returns an integer of 48. Then, Chr$ returns the string version of the ascii value of 48, which is "0".

 
Share this answer
 
v2
It's converting the value "0" to it's ascii value

Ascii value for 0 = 48

For a full list of ascii see here[^]

For a way to this in c# see here[^]
 
Share this answer
 
v3
Comments
William Winner 17-May-10 11:07am    
it's also then converting the ascii value back into a string.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900