获得一个字符的ASCII值
VB.NET代码:
C#代码
Dim charactertofind As String
'Find ASCII value of g
charactertofind = "g"
charactertofind = Asc(charactertofind)
'MsgBox(charactertofind) window code
Response.Write(charactertofind) 'Web Code
'Find ASCII value of g
charactertofind = "g"
charactertofind = Asc(charactertofind)
'MsgBox(charactertofind) window code
Response.Write(charactertofind) 'Web Code
C#代码
string charactertofind;
charactertofind = "g";
charactertofind = Microsoft.VisualBasic.Strings.Asc(charactertofind).ToString();
Response.Write(charactertofind);
charactertofind = "g";
charactertofind = Microsoft.VisualBasic.Strings.Asc(charactertofind).ToString();
Response.Write(charactertofind);