My boss forbids me to use var as it would cause boxing and slowing down the app.
Is that true?
An approach that might work is to write these two methods:
public static void WithInt()
{
int x = 5;
Console.WriteLine(x);
}
public static void WithVar()
{
var x = 5;
Console.WriteLine(x);
}
Compile, and use ildasm to examine the produced CIL. Show your boss.
edit @ck has done all but the last step for you :)