//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");
C#中也有Asc("A")? 我怎么没查到?
char a='1'; int asc=a;
class Test { static void Main() { int i = (int)'A'; int j = (int)"Apple"[0]; System.Console.WriteLine(i); // 65 System.Console.WriteLine(j); // 65 } }
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");
我怎么没查到?
int asc=a;
{
static void Main()
{
int i = (int)'A';
int j = (int)"Apple"[0];
System.Console.WriteLine(i); // 65
System.Console.WriteLine(j); // 65
}
}