Skip to content

Return T from Assert.IsInstanceOfType<T>() #1573

@gao-artur

Description

@gao-artur

This PR introduced the generic version of the Assert.IsInstanceOfType<T>(). It will be much more useful to return the T from the method, so the two lines of code

Assert.IsInstanceOfType<MyType>(obj);
var myTypeObj = (MyType)obj;

can be replaced with a single line

var myTypeObj = Assert.IsInstanceOfType<MyType>(obj);

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions