NBMsgPack062: UnusedDataPacket
properties should be private
A data type containing the special UnusedDataPacket member should be declared as private
.
Example violation
public class Person
{
public required string Name { get; set; }
public UnusedDataPacket Extension { get; set; } // NBMsgPack062
}
Resolution
Change the public
accessibility modifier to private
.
In doing so, remember to also add a PropertyShapeAttribute to avoid introducing NBMsgPack060.
public class Person
{
public required string Name { get; set; }
[PropertyShape]
private UnusedDataPacket Extension { get; set; }
}