Repository: dotnet/runtime
File: src/libraries/System.Net.Security/src/System/Net/NegotiateAuthenticationPal.ManagedNtlm.cs (C#)

Code before:
                public fixed byte Header[HeaderLength];
                public MessageType MessageType;
                private byte _unused1;
                private byte _unused2;
                private byte _unused3;
            }

            [StructLayout(LayoutKind.Sequential)]
            private unsafe struct Version
            {
                public byte VersionMajor;
                public byte VersionMinor;
                public ushort ProductBuild;
                private byte _unused4;
                private byte _unused5;
                private byte _unused6;
                public byte CurrentRevision;
            }

            // Type 1 message
            [StructLayout(LayoutKind.Sequential)]
            private unsafe struct NegotiateMessage
            {
                public MessageHeader Header;
                public Flags Flags;
                public MessageField DomainName;
                public MessageField WorkStation;
                public Version Version;
            }

            // TYPE 2 message
            [StructLayout(LayoutKind.Sequential)]
            private unsafe struct ChallengeMessage
            {
                public MessageHeader Header;
                public MessageField TargetName;
                public Flags Flags;
                public fixed byte ServerChallenge[ChallengeLength];
                private ulong _unused;
                public MessageField TargetInfo;
                public Version Version;
            }

            // TYPE 3 message
            [StructLayout(LayoutKind.Sequential)]
            private unsafe struct AuthenticateMessage
            {
                public MessageHeader Header;
                public MessageField LmChallengeResponse;
                public MessageField NtChallengeResponse;
                public MessageField DomainName;

Review comment (suggestion):
```suggestion
                    readonly get => BitConverter.IsLittleEndian? _productBuild: BinaryPrimitives.ReverseEndianness(_productBuild);
                    set => _productBuild = BitConverter.IsLittleEndian? value: BinaryPrimitives.ReverseEndianness(value);
```

Code after:
            }

            [StructLayout(LayoutKind.Sequential)]
            private unsafe struct MessageHeader
            {
                public fixed byte Header[HeaderLength];
                public MessageType MessageType;
                private byte _unused1;
                private byte _unused2;
                private byte _unused3;
            }

            [StructLayout(LayoutKind.Sequential)]
            private unsafe struct Version
            {
                public byte VersionMajor;
                public byte VersionMinor;
                private ushort _productBuild;
                private byte _unused4;
                private byte _unused5;
                private byte _unused6;
                public byte CurrentRevision;
                public ushort ProductBuild
                {
                    readonly get =>BitConverter.IsLittleEndian? _productBuild: BinaryPrimitives.ReverseEndianness(_productBuild);
                    set =>_productBuild = BitConverter.IsLittleEndian? value: BinaryPrimitives.ReverseEndianness(value);
                }
            }

            // Type 1 message
            [StructLayout(LayoutKind.Sequential)]
            private unsafe struct NegotiateMessage
            {
                public MessageHeader Header;
                private Flags _flags;
                public MessageField DomainName;
                public MessageField WorkStation;
                public Version Version;
                public Flags Flags
                {
                    readonly get =>BitConverter.IsLittleEndian? _flags: (Flags)BinaryPrimitives.ReverseEndianness((uint)_flags);
                    set =>_flags = BitConverter.IsLittleEndian? value: (Flags)BinaryPrimitives.ReverseEndianness((uint)value);
                }
            }

            // TYPE 2 message
            [StructLayout(LayoutKind.Sequential)]
            private unsafe struct ChallengeMessage
            {
                public MessageHeader Header;
                public MessageField TargetName;