What is Type Inferencing?

 Posted by Tripati_tutu on 4/30/2011 | Category: C# Interview questions | Views: 2543 | Points: 40
Answer:

The Type Inferencing is a technique which is used to get the data type of the
variable that is determined by the compiler on the basis of the value assigned to the
variable.
The variable must be declared using the var keyword and shouldn't have
null values. The variable should also be assigned some value and the declaration
should be method level.

Like var value=100;
But we can't mention like var value=null;


Asked In: Many Interviews | Alert Moderator 

Comments or Responses

Login to post response