Search Results for

    Show / Hide Table of Contents

    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

    • XmlSerializableConstraint
    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

    • Edit this page
    In this article
    Back to top Generated by DocFX | Copyright (c) 2018- The NUnit Project - Licensed under CC BY-NC-SA 4.0