August 2015
Beginner
1075 pages
40h 42m
English
In the later versions of Visual Basic and C# (2008 and later), you can define variables without explicitly setting their data type. And, when doing so, you can still get the benefits of strongly typed variables (compiler checking, memory allocation, and more). The compilers actually infer the data type you intend to use based on your code. This process is called local type inference or implicit typing.
For example, consider the following lines of code. Here you create a variable of type String and assign a value.
C#
string companyName = "Contoso";
VB
Dim companyName As String = "Contoso"
Now, let’s look at the same line of code using type ...
Read now
Unlock full access