Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

.IsTypeOf<>() is not available for DateTime #3183

Copy link
Copy link

Description

@Dona278
Issue body actions

We have a value returned from method which works with generic, so we want to check the returned type and seems that DateTime doesn't work in the same way of other types.

(assign null is only for example)

// This works
string? a = null;
await Assert.That(a).IsTypeOf<DateTime>();

// This not compile
DateTime? b = null;
await Assert.That(b).IsTypeOf<DateTime>();
Reactions are currently unavailable

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

    Morty Proxy This is a proxified and sanitized view of the page, visit original site.