equivalent
-
Apart from lacking a parenthesis, it does not make much sense; Asc() returns a number holding the ASCII value, which is 48 for a zero; and Chr$() does the inverse, it returns the ASCII character equivalent of a numeric value. So they cancel each other, it simply means
"0"
In C# we use different delimiters for string literals and character literals, so you may want a simple'0'
:)Luc Pattyn [Forum Guidelines] [Why QA sucks] [My Articles]
I only read formatted code with indentation, so please use PRE tags for code snippets.
I'm not participating in frackin' Q&A, so if you want my opinion, ask away in a real forum (or on my profile page).
-
Apart from lacking a parenthesis, it does not make much sense; Asc() returns a number holding the ASCII value, which is 48 for a zero; and Chr$() does the inverse, it returns the ASCII character equivalent of a numeric value. So they cancel each other, it simply means
"0"
In C# we use different delimiters for string literals and character literals, so you may want a simple'0'
:)Luc Pattyn [Forum Guidelines] [Why QA sucks] [My Articles]
I only read formatted code with indentation, so please use PRE tags for code snippets.
I'm not participating in frackin' Q&A, so if you want my opinion, ask away in a real forum (or on my profile page).
-
i want convert eny caractere in ascii the 0 is a exemple so if there is some code to calc ascci please send it to me i need it now
in .NET an ASCII character is just a character, the first 128 Unicode characters ARE the ASCII characters. So
'a'
"a"[0]
(char)97are all the same lower-case a, as they are
a character literal
the way to get the first character of a string
a number cast to a characterIf you don't understand the fundamentals, go buy a book and study it. If you have an overall problem, tell us about the problem rather than asking a detail question on what probably isn't even the right detail. :)
Luc Pattyn [Forum Guidelines] [Why QA sucks] [My Articles]
I only read formatted code with indentation, so please use PRE tags for code snippets.
I'm not participating in frackin' Q&A, so if you want my opinion, ask away in a real forum (or on my profile page).
-
There is no equivalent; C# developers are smart enought not to write anything as silly as that. :-D
-
There is no equivalent; C# developers are smart enought not to write anything as silly as that. :-D
-
There is no equivalent; C# developers are smart enought not to write anything as silly as that. :-D
Sure, however you should allow some slack for VB coders trying to spit out some C#. How about
char ascee='0';
char uniquode=Encoding.UTF8.GetChars(Encoding.ASCII.GetBytes(new char[]{ascee}))[0];:)
Luc Pattyn [Forum Guidelines] [Why QA sucks] [My Articles]
I only read formatted code with indentation, so please use PRE tags for code snippets.
I'm not participating in frackin' Q&A, so if you want my opinion, ask away in a real forum (or on my profile page).
-
Sure, however you should allow some slack for VB coders trying to spit out some C#. How about
char ascee='0';
char uniquode=Encoding.UTF8.GetChars(Encoding.ASCII.GetBytes(new char[]{ascee}))[0];:)
Luc Pattyn [Forum Guidelines] [Why QA sucks] [My Articles]
I only read formatted code with indentation, so please use PRE tags for code snippets.
I'm not participating in frackin' Q&A, so if you want my opinion, ask away in a real forum (or on my profile page).
-
Sure, however you should allow some slack for VB coders trying to spit out some C#. How about
char ascee='0';
char uniquode=Encoding.UTF8.GetChars(Encoding.ASCII.GetBytes(new char[]{ascee}))[0];:)
Luc Pattyn [Forum Guidelines] [Why QA sucks] [My Articles]
I only read formatted code with indentation, so please use PRE tags for code snippets.
I'm not participating in frackin' Q&A, so if you want my opinion, ask away in a real forum (or on my profile page).
Luc Pattyn wrote:
allow some slack for VB coders
They made their sty they can wallow in it. :-D
-
Luc Pattyn wrote:
allow some slack for VB coders
They made their sty they can wallow in it. :-D
sig material it is. :thumbsup:
Luc Pattyn [Forum Guidelines] [Why QA sucks] [My Articles]
I only read formatted code with indentation, so please use PRE tags for code snippets.
I'm not participating in frackin' Q&A, so if you want my opinion, ask away in a real forum (or on my profile page).