Skip to content

How to convert EventCallback<T> to EventCallback<bool> #10544

@enetstudio

Description

@enetstudio

Blazor has a generic class named EventCallback

How can I cast a
protected EventCallback<T> ValueChanged { get; set; }
to
EventCallback<bool> BoolChanged { get { if (typeof(T) == typeof(bool)) return ValueChanged; //<== Error needs cast some how? } }

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions