I want to discuss my problem clearly.
I have a function to Swap value of two variable
public static void Swap<T>(ref T first, ref T second)
{
T temp = first;
first = second;
second = temp;
}
I have use it in my code as this:
Swap<DateTime>(ref TarikhePayaneGozaresh, ref TarikheShorooeGhozaresh);
I have checked it many times and now I am confused.
As you can see the value didn’t swaped!
Update : I have write more of my code.
The swap works fine:
I can only conclude that the problem is something outside of the code you have shown us, for example: