Skip to content
This repository was archived by the owner on Jul 26, 2023. It is now read-only.

Commit b8edb96

Browse files
committed
Merge pull request #228 from AArnott/fix227
Use explicit field behind NTSTATUS.Value property
2 parents 8ccf903 + b966097 commit b8edb96

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

src/Windows.Core/NTStatus.cs

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,11 @@ public partial struct NTSTATUS : IComparable, IComparable<NTSTATUS>, IEquatable<
8080
/// </summary>
8181
private const int FacilityStatusShift = 0;
8282

83+
/// <summary>
84+
/// The full NT_STATUS value, as a <see cref="Code"/> enum.
85+
/// </summary>
86+
private readonly Code value;
87+
8388
/// <summary>
8489
/// Initializes a new instance of the <see cref="NTSTATUS"/> struct.
8590
/// </summary>
@@ -104,13 +109,13 @@ public NTSTATUS(int status)
104109
/// <param name="status">The value of the NTStatus.</param>
105110
public NTSTATUS(Code status)
106111
{
107-
this.Value = status;
112+
this.value = status;
108113
}
109114

110115
/// <summary>
111116
/// Gets the full NT_STATUS value, as a <see cref="Code"/> enum.
112117
/// </summary>
113-
public Code Value { get; }
118+
public Code Value => this.value;
114119

115120
/// <summary>
116121
/// Gets the NT_STATUS as a 32-bit signed integer.

0 commit comments

Comments
 (0)