Files
linker/common.libs/BooleanHelper.cs
2024-05-18 01:23:50 +08:00

19 lines
378 B
C#

using System.Threading;
namespace common.libs
{
public static class BooleanHelper
{
public static bool CompareExchange(ref bool location, bool value, bool comparand)
{
bool result = location;
if(location == comparand)
{
location = value;
}
return result;
}
}
}