| Case sensitive | Not case sensitive: response.write("Yo") ' OK | Case sensitive: response.write("Yo"); // Error Response.Write("Yo"); // OK |
| Functional blocks | Use beginning and ending statements to declare functional blocks of code: Sub Show(strX as String) Response.Write(strX) End Sub | Use braces to declare functional blocks of code: |
| Type conversion | Implicit type conversions are permitted by default: You can limit conversions by including an Option Strict On statement at the beginning of modules. | Type conversions are performed explicitly by casts: intX = (int)3.14; //Cast, OK. Or, use type conversion methods: string strX; strX = intX.ToString(); |
| Arrays | Array elements are specified using parentheses: | Array elements are specified using square brackets: |
| Methods | You can omit parentheses after method names if arguments are omitted: | You must include parentheses after all methods: |
| Statement termination | Statements are terminated by carriage return: | Statements are terminated by the semicolon (;): |
| Statement continuation | Statements are continued using the underscore (_): intX = System.Math.Pi * _ intRadius | Statements continue until the semicolon (;) and can span multiple lines if needed: intX = System.Math.PI * intRadius; |
| String operator | Use the ampersand (&) or plus sign (+) to join strings: strFruit = "Apples" & _ " Oranges" | Use the plus sign (+) to join strings: strFruit = "Apples" + " Oranges"; |
| Comparison operators | Use =, >, <, >=, <=, <> to compare values: | Use ==, >, <, >=, <=, != to compare values: |
| Negation | Use the Not keyword to express logical negation: | Use the ! operator to express logical negation: |
| Object comparison | Use the Is keyword to compare object variables: | Use == to compare object variables: |
| Object existence | Use the Nothing keyword or the IsNothing function to check if an object exists: | Use the null keyword to check if an object exists: |