What is the purpose of the var keyword?

Junior C#

Answer

var allows the compiler to infer the type of a variable automatically.
The actual type is determined at compile-time, not runtime.

Want to bookmark, take notes, or join discussions?

Sign in to access all features and personalize your learning experience.

Sign In Create Account

Source: SugharaIQ

Ready to level up? Start Practice