• λ我爱Aspx >> Asp.Net >> VB C# 语法对比图 (代码实例)
  • VB C# 语法对比图 (代码实例)

  • :未知  Դ:非寒日志  :2007-4-21 0:45:43  ؼ:c#
  • Enum Action Start 'Stop is a reserved word [Stop] Rewind Forward End Enum Enum Status Flunk = 50 Pass = 70 Excel = 90 End Enum Dim a As Action = Action.Stop If a <> Action.Start Then _ 'Prints "Stop is 1" System.Console.WriteLine(a.ToString & " is " & a) 'Prints 70 System.Console.WriteLine(Status.Pass) 'Prints Pass System.Console.WriteLine(Status.Pass.ToString()) C# enum Action {Start, Stop, Rewind, Forward}; enum Status {Flunk = 50, Pass = 70, Excel = 90}; Action a = Action.Stop; if (a != Action.Start) //Prints "Stop is 1" System.Console.WriteLine(a + " is " + (int) a); // Prints 70 System.Console.WriteLine((int) Status.Pass); // Prints Pass System.Console.WriteLine(Status.Pass); Operators VB.NET 'Comparison = < > <= >= <> 'Arithmetic + - * / Mod (integer division) ^ (raise to a power) 'Assignment = += -= *= /= = ^= <<= >>= &= 'Bitwise And AndAlso or OrElse Not << >> 'Logical And AndAlso or OrElse Not 'String Concatenation & C# //Comparison == < > <= >= != //Arithmetic + - * / % (mod) / (integer division if both operands are ints) Math.Pow(x, y) //Assignment = += -= *= /= %= &= |= ^= <<= >>= ++ -- //Bitwise & | ^ ~ << >> //Logical && || ! //String Concatenation + Choices Ҷƪл˵?
  • һƪ魏总的感触
    һƪ河北文安地震?