获得一个字符的ASCII值

VB.NET代码:
    Dim charactertofind As String
    
'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);

posted on 2004-09-25 09:18  小牛哥  阅读(3698)  评论(10编辑  收藏  举报

导航