Calling method of non-assigned class
问题 I have doubt about these two aspects; First one; Test test = new Test(); result = test.DoWork(_param); Second one; result = new Test().DoWork(_param); What happens if we dont assign the newly created instance to a variable and directly call the method? I see some difference between two way on IL code. This one below is IL output of first c# code IL_0000: ldstr "job " IL_0005: stloc.0 IL_0006: newobj instance void Works.Test::.ctor() IL_000b: stloc.1 IL_000c: ldloc.1 IL_000d: ldloc.0 IL_000e: