Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
[This documentation is for preview only, and is subject to change in later releases. Blank topics are included as placeholders.]
Returns an Integer value representing the character code corresponding to a character.
Namespace: Microsoft.VisualBasic
Assembly: Microsoft.VisualBasic (in Microsoft.VisualBasic.dll)
Syntax
'Declaration
Public Shared Function AscW ( _
String As Char _
) As Integer
public static int AscW(
char String
)
public:
static int AscW(
wchar_t String
)
static member AscW :
String:char -> int
public static function AscW(
String : char
) : int
Parameters
- String
Type: System. . :: . .Char
Required. Any valid Char or String expression. If String is a String expression, only the first character of the string is used for input. If String is Nothing or contains no characters, an ArgumentException error occurs.
Return Value
Type: System. . :: . .Int32
Returns an Integer value representing the character code corresponding to a character.
Remarks
Asc returns the code point, or character code, for the input character. This can be 0 through 255 for single-byte character set (SBCS) values and -32768 through 32767 for double-byte character set (DBCS) values.
AscW returns the Unicode code point for the input character. This can be 0 through 65535. The returned value is independent of the culture and code page settings for the current thread.
Note
The AscB function of earlier versions of Visual Basic returns a code for a byte, rather than a character. It is used primarily for converting strings in double-byte character set (DBCS) applications. All Visual Basic 2005 strings are in Unicode, and AscB is no longer supported.
.NET Framework Security
- Full trust for the immediate caller. This member cannot be used by partially trusted code. For more information, see dd66cd4c-b087-415f-9c3e-94e3a1835f74.