IT SOLUTIONS
Your full service technology partner! 
-Collapse +Expand
To/From Code
-Collapse +Expand Cross Ref Guide
-Collapse +Expand Members-Only
Sign in to see member-only pages.
   ► KBTo/From GuidesVB.Net  Print This     

Variables (VB.Net and C++/CLI Cross Reference Guide)

By Mike Prestwood

VB.Net versus C++/CLI: A side by side comparison between VB.Net and C++/CLI.

 
Language Basics
 

Language basics is kind of a catch all for absolute beginner stuff. The items (common names) I chose for language basics is a bit random and include items like case sensitivity, commenting, declaring variables, etc.

Variables

[Other Languages] 

Languages Focus

A variable holds a value that you can use and change throughout your code so long as the variable is within scope. With variable declaration, you not only want to know the syntax of how you declare a variable but you also want to know where. Are you allowed to declare a variable inline? What are the available scopes: local vs. global. Can you assign a value at the same time you declare a variable?

VB.Net:   Dim x As Integer=0

Variables are case sensitive but VS.Net will auto-fix your variable names to the defined case. You can declare variables in-line wherever you need them and declarative variable assignment is supported.

Syntax Example:  

Dim FullName As String

Dim Age As Integer

Dim Weight As Double

FullName = "Mike Prestwood"

Age = 32

Weight = 154.4

'Declaritive variable assignment:

Dim Married As String = "Y"

MsgBox(Married)

C++/CLI: 












Sales Website: www.prestwood.com Or visit our legacy sales site: 
legacy.prestwood.com


©1995-2025 Prestwood IT Solutions.   [Security & Privacy]