Which C# keyword declares a local variable whose type is inferred by the compiler at compile time?
Correct answer
C. var
13 views
C. var
13 views
var is still statically typed: the compiler fixes the type from the initialiser. dynamic postpones type checking until runtime, and auto is a C++ keyword.
Asked in: NTS, Technical Interviews
Not sure why the answer is C? Ask here and get an explanation.