Are generic type constraints possible in blazor?

后端 未结 1 1942
轻奢々
轻奢々 2020-12-22 00:24

How can I restrict TModel to be classes only or to be implementing a specifix interface?

@typeparam TModel

cannot get the syntax working.<

相关标签:
1条回答
  • 2020-12-22 01:02

    The solution is to additionally put the type constraint in a partial code behind class. It works!

    0 讨论(0)
提交回复
热议问题