please consider this code :
1)public static class MyClass
2){
3) public static DateTime MyMethod(DateTime dt)
4) {
5) DateTime temp = new DateTime();
6) temp = dt.AddDays(1);
7) return temp;
8) }
9)}
Does temp
variable has instance per any calls to MyMethod
? or because it is in a static method inside static class just one instance of temp
variable allocate in memory?
thanks