Variant is back but in C#

var is the keyword to define a variant type variable. Unlike an object type, var is an enumeration and boxing/unboxing operation is not required during the conversion.

This is how you define a var.

Here is a screen from Session notes on new C# 3.0 features.

Next Recommended Reading Why am I Passionate about C-SharpCorner?

Mindcracker
Founded in 2003, Mindcracker is the authority in custom software development and innovation. We put best practices into action. We deliver solutions based on consumer and industry analysis.