diff --git a/src/Core/Silk.NET.Core/Miscellaneous/Bool32.cs b/src/Core/Silk.NET.Core/Miscellaneous/Bool32.cs index 115cec5c00..af1c1e948d 100644 --- a/src/Core/Silk.NET.Core/Miscellaneous/Bool32.cs +++ b/src/Core/Silk.NET.Core/Miscellaneous/Bool32.cs @@ -10,10 +10,12 @@ namespace Silk.NET.Core /// public readonly struct Bool32 : IEquatable, IEquatable, IEquatable { + private readonly uint _value; + /// /// Gets the 32-bit value for this boolean. /// - public uint Value { get; } + public uint Value { get => _value; } /// /// Returns the hash code for this instance. @@ -63,27 +65,27 @@ public override int GetHashCode() /// Creates a 32-bit boolean from the given 32-bit unsigned integer. /// /// The 32-bit unsigned integer value. - public Bool32(uint val) => Value = val; + public Bool32(uint val) => _value = val; /// /// Creates a 32-bit boolean from the given managed boolean. /// /// The boolean value. - public Bool32(bool val) => Value = val ? 1u : 0u; + public Bool32(bool val) => _value = val ? 1u : 0u; /// /// Converts this 32-bit boolean to a managed boolean. /// /// The 32-bit boolean. /// The managed boolean. - public static implicit operator bool(Bool32 val) => val.Value == 1; + public static implicit operator bool(Bool32 val) => val._value == 1; /// /// Converts this 32-bit boolean to a 32-bit unsigned integer. /// /// The 32-bit boolean. /// The 32-bit unsigned integer. - public static implicit operator uint(Bool32 val) => val.Value; + public static implicit operator uint(Bool32 val) => val._value; /// /// Creates a 32-bit boolean from the given managed boolean.