Difference between "var" and "object" in C#

c#, types

Solution

Beginning in Visual C# 3.0, variables that are declared at method scope can have an implicit type `var`. An implicitly typed local variable is strongly typed just as if you had declared the type yourself, but the compiler determines the type. The following two declarations of `i` are functionally equivalent:

var i = 10; //implicitly typed
int i = 10; //explicitly typed

var isn't object

You should definitely read this : C# 3.0 - Var Isn't Object

Problem

Is the `var` type an equivalent to `Variant` in VB? When `object` can accept any datatype, what is the difference between those two?

Original source

Related problems