mirror of
https://github.com/snltty/linker.git
synced 2025-10-07 18:11:56 +08:00
17 lines
353 B
C#
17 lines
353 B
C#
namespace linker.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;
|
|
}
|
|
}
|
|
}
|