BinarySerializable Constraint
BinarySerializableConstraint
tests whether an object is serializable in binary format.
Constructor
BinarySerializableConstraint()
Syntax
Is.BinarySerializable
Examples of Use
Assert.That(someObject, Is.BinarySerializable));
See also
Warning
Binary Serialization is no longer supported in .NET 8 due to security concerns. From NUnit 4.x onward, this constraint is not available. More information can be found in these Microsoft Learn articles on BinaryFormatter's removal and on the BinaryFormatter security guide