mirror of https://github.com/dahall/Vanara.git
Fixed bug in SetBit
parent
5739032c58
commit
ee0d7a0e2c
|
@ -21,7 +21,7 @@ namespace Vanara.Extensions
|
|||
{
|
||||
long bit = 1 << idx;
|
||||
var l = bits.ToInt64(null);
|
||||
bits = (T)(object)(value ? l | bit : l & ~bit);
|
||||
bits = (T)Convert.ChangeType(value ? l | bit : l & ~bit, typeof(T));
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue