Local Type Inference
In Visual Basic 2008, the compiler uses the type inference feature to determine the data types of the local variables that are declared without using the As keyword. Normally, when we declare a variable, we use the As keyword to specify its data type. Such a type of declaration is called explicit type declaration. However, with the type inference feature, you can declare a variable without using the As keyword. In this way, you can declare variables without explicitly specifying their data type.
The following code snippet shows how to declare a variable by using explicit type declaration:
Dim k AS Integer = 9
The following code snippet shows how to declare a variable by using the local type inference feature:
Dim number = 7
Note that in the preceding code snippet, we have not used the As keyword to declare the variable, number.
Email Based, Online Homework Assignment Help in Local Type Inference
Transtutors is the best place to get answers to all your doubts regarding local type inference. You can submit your school, college or university level homework or assignment to us and we will make sure that you get the answers you need which are timely and also cost effective. Our tutors are available round the clock to help you out in any way with Dot Net.