The CLR makes a hard promise that all local variables will be initialized to their default value upon entry into the method before the first statement is executed. This promise is implemented by the JIT compiler. Seeing this is a bit difficult since the C# requires variables to be initialized explicitly before they are used. But here's an example:
static void Main(string[] args) {
int ix;
int.TryParse("42", out ix);
Console.WriteLine("", ix);
}
Use Debug + Windows + Disassembly to see the generated code:
// Stack frame setup elided...
00000006 xor eax,eax ; eax = 0
00000008 mov dword ptr [ebp-0Ch],eax ; ix = 0
// etc..
Rewriting this to initialize ix to zero produces this code:
00000006 xor eax,eax ; eax = 0
00000008 mov dword ptr [ebp-0Ch],eax ; ix = 0
0000000b xor edx,edx ; edx = 0
0000000d mov dword ptr [ebp-0Ch],edx ; ix = 0
Well, that's a bit sad. The JIT compiler is usually quite good at optimizing useless code away but fumbles in this particular case.
So, you're friend is right. At least for the x86 JIT compiler, not close to an x64 machine right now. The overhead is probably around half a nanosecond or so. Not something that is easy to measure.