Difference Between Keywords 8216var8217 And 8216dynamic8217 #43
DIFFERENCE BETWEEN KEYWORDS ‘VAR’ AND ‘DYNAMIC’?
This multiple choice question (MCQ) is related to the book/course gs gs108 CSharp. It can also be found in gs gs108 Data Types, Variables and Operators - Initialization of Variables - Quiz No.1.
DIFFERENCE BETWEEN KEYWORDS ‘VAR’ AND ‘DYNAMIC’?
‘Var’ is introduced in C# (3.0) and ‘Dynamic’ is introduced in C# (4.0)
‘Var’ is a type of variable where declaration is done at compile time by compiler while ‘Dynamic’ declaration is achieved at runtime by compiler
For ‘Var’ Error is caught at compile time and for ‘Dynamic’ Error is caught at runtime
All of the mentioned