如题

解决方案 »

  1.   

    //vb.net
    Dim MyInt As Integer
    MyInt = Asc("A")   ' MyInt is set to 65.
    MyInt = Asc("a")   ' MyInt is set to 97.
    MyInt = Asc("Apple")   ' MyInt is set to 65.
    //c#
    int MyInt; 
    private object MyInt = Asc("A"); 
    private object MyInt = Asc("a"); 
    private object MyInt = Asc("Apple");
      

  2.   

    C#中也有Asc("A")?
    我怎么没查到?
      

  3.   

    char a='1';
    int asc=a;
      

  4.   

    class Test
    {
      static void Main()
      {
        int i = (int)'A';
        int j = (int)"Apple"[0];
        System.Console.WriteLine(i);  // 65
        System.Console.WriteLine(j);  // 65
      }
    }