Differences between C# and VB.Net Syntax
Workflows use VB.Net syntax for expressions.
WorkflowEditor 2.x will support C# syntax for expressions.
VB.Net | C# | |
---|---|---|
Case-sensitive | no | yes |
Null reference |
VB
|
C#
|
Equals operator | = | == |
Equals Not operator | <> | != |
Comparison to null |
VB
|
C#
|
Character literal | "a"C | 'a' |
String escaping | Backslash: "\" Quotes: double quote | Backslash: "\\" or @"\" Quotes: "\"" or @"""" (double quote) |
Access indexed elements | Round brackets ( ) | Square brackets [ ] |
Generic types |
VB
|
C#
|
Object initializers |
VB
VB
For a typed array Int32[]
VB
|
C#
C#
For a typed array Int32[]
C#
|
Short-circuiting logical operators |
VB
And/Or are always evaluating ALL parts of it! |
C#
|
Non-short circuiting logical operators |
VB
Example:
VB
Will throw exception when entry is Nothing! | n/a |
Anonymous function |
VB
|
C#
|
LINQ |
VB
|
C#
|
Data type names | Integer | int |
Also see https://en.wikipedia.org/wiki/Comparison_of_C_Sharp_and_Visual_Basic_.NET