A variable is just a named storage location in memory. At the top of all your modules you should have "Option Explicit" to force explicit declaration.
Variables are case sensitive in C#.
Variables that are not defined explicitly have the "Variant" data type assigned to them by default.
Variables can accommodate a wide variety of data types from simple boolean values to extremely large 20 digit numbers.
In C# assigning values to variables and comparing values are treated as two very different operations.
Because of this they have different symbols
= - for assignment
== - for comparison
In VB this is the same symbol (=).
Prefix private variables with an underscore "_"
Use Pascal casing for public variables
Use Hungarian notation for private or local variables
Always try and declare your local variables at the very top of the method and not amongst lines of code
Do not use language specific type names. For example use Int16 instead of Short
© 2023 Better Solutions Limited. All Rights Reserved. © 2023 Better Solutions Limited TopPrevNext