24 lines
456 B
C#
24 lines
456 B
C#
/*
|
|
* Author: Nikolay Dvurechensky
|
|
* Site: https://www.dvurechensky.pro/
|
|
* Gmail: dvurechenskysoft@gmail.com
|
|
* Last Updated: 12 мая 2025 02:47:11
|
|
* Version: 1.0.3
|
|
*/
|
|
|
|
public class SwapTestClass
|
|
{
|
|
public static void GenericSwap<T>(ref T a, ref T b)
|
|
{
|
|
T temp = a;
|
|
a = b;
|
|
b = temp;
|
|
}
|
|
|
|
public static void Swap(ref object a, ref object b)
|
|
{
|
|
object temp = a;
|
|
a = b;
|
|
b = temp;
|
|
}
|
|
} |