An open API service indexing awesome lists of open source software.

https://github.com/sql-mistermagoo/blazorpartialconstraint

Demonstrate Generic Component with Type Constraint
https://github.com/sql-mistermagoo/blazorpartialconstraint

Last synced: 4 months ago
JSON representation

Demonstrate Generic Component with Type Constraint

Awesome Lists containing this project

README

          

Sample project demonstrates a constraint on a generic component

Please look at ConstrainedComponent in the Shared folder and its usage in Index.razor.

The compiler may not infer the type so you can specify the type as demonstrated here

``` HTML

```

Note: TItem="DateTime" tells the compiler that your generic type is a DateTime.