Quantcast
Channel: Active questions tagged blazor - Stack Overflow
Viewing all articles
Browse latest Browse all 4261

Why do I get Partial declarations must not specify different base classes in Blazor Webassembly? [duplicate]

$
0
0

I've looked into every related question but I haven't found a solution yet.

I have two files: Table.razor, and Table.razor.cs

Table.razor looks like this:

@namespace MyComponents@inherits Table<T>@typeparam T where T : class...

Table.razor.cs looks like this:

using Microsoft.AspNetCore.Components;namespace MyComponents;public partial class Table<T> : ComponentBase where T : class;

The problem is that I got

Partial declarations of 'Table<T>' must not specify different base classes

And I do not understand the error.

Also, I got a no related 'dll could not be found' error.

Also, I have these two classes with NO errors:TableColumn.razor

@namespace MyComponents@inherits TableColumn<T, TValue>@typeparam T where T : class@typeparam TValue

TableColumn.razor.cs

public partial class TableColumn<T, TValue> : ComponentBase, ITableColumnwhere T : class

ITableColumn is an empty interface.


Viewing all articles
Browse latest Browse all 4261

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>