When I try this code
public static void Main()
{
Console.WriteLine("Total bytes : " + GC.GetTotalMemory(true));
Console.WriteLine("Total bytes : " + GC.GetTotalMemory(true));
Console.WriteLine("Total bytes : " + GC.GetTotalMemory(true));
Console.ReadKey();
}
I get these results

Why there is a difference between first and rest of the results?
One reason for this would be that your code is translated to something like this:
On the second line of the above code, the
Stringclass is initialized, if it hasn’t been already. That means its static fields are initialized and its static constructor is called (if it has any). Then theConcat()method is called, and all classes required during its run are initialized too.And on the third line the
Consoleclass is initialized, if it hasn’t been already. Then of course all the classes used during the execution ofWriteLine()too.All the static fields require some memory, so it males sense that when you call
GC.GetTotalMemory()for the second time, you get a somewhat higher number.