Q:

Benefit of having variable assignment on the return line

As stated, I'm curious if there's any benefit of doing:
return someNumber = CalculateResults(parameter);

versus doing:
someNumber = CalculateResults(parameter);
return someNumber;

or doing:
return CalculateResults(parameter);

Is there any performance gained in using one over the other?  

A:

While with active optimizations probably all the three would be the same, they produce slightly different results without.
The first and the second have to declare a variable in the scope and return it, while the last  doesn't. I've tried to compile the following program:
int Calculate()
{
    return 42;
}

int FirstCase()
{
    int x;
    return x = Calculate();
}

int SecondCase()
{
    var x = Calculate();
    return x;
}

int ThirdCase()
{
    return Calculate();
}

Output with LINQPad:
FirstCase:
IL_0000:  nop         
IL_0001:  ldarg.0     
IL_0002:  call        UserQuery.Calculate
IL_0007:  dup         
IL_0008:  stloc.0     // x
IL_0009:  stloc.1     // CS$1$0000
IL_000A:  br.s        IL_000C
IL_000C:  ldloc.1     // CS$1$0000
IL_000D:  ret         

SecondCase:
IL_0000:  nop         
IL_0001:  ldarg.0     
IL_0002:  call        UserQuery.Calculate
IL_0007:  stloc.0     // x
IL_0008:  ldloc.0     // x
IL_0009:  stloc.1     // CS$1$0000
IL_000A:  br.s        IL_000C
IL_000C:  ldloc.1     // CS$1$0000
IL_000D:  ret         

ThirdCase:
IL_0000:  nop         
IL_0001:  ldarg.0     
IL_0002:  call        UserQuery.Calculate
IL_0007:  stloc.0     // CS$1$0000
IL_0008:  br.s        IL_000A
IL_000A:  ldloc.0     // CS$1$0000
IL_000B:  ret         

The third case is a little shorter. I also prefer that approach, because it feels more fluent than allocating a variable for it. The only reason I'd use a variable is to try to "document" what the method does by giving a meaningful name to the return value, through the variable.

