Search Results for

    Show / Hide Table of Contents

    ExactType Constraint

    ExactTypeConstraint tests that an object is an exact Type.

    Constructor

    ExactTypeConstraint(Type)
    

    Syntax

    Is.TypeOf(Type)
    Is.TypeOf<T>()
    

    Examples of Use

    Assert.That("Hello", Is.TypeOf(typeof(string)));
    Assert.That("Hello", Is.Not.TypeOf(typeof(int)));
    
    Assert.That("World", Is.TypeOf<string>());
    
    • 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