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

How do I test the Generic Type in Blazor

$
0
0

So in the page I have:

@typeparam TItem;

with my partial class declared:

public partial class MultipleDropdown<TItem>{    [Parameter]    public TItem AssignedValues { get; set; } ......

Now I thought that I'd simply be able to do :

if (typeof(AssignedValues) == typeof(Dictionary<int,string>)) { ......

but VS red lines the AssignedValues with the type of namespace AssignedValues could not be found. How can I test the type of object that has been passed?


Viewing all articles
Browse latest Browse all 4839

Trending Articles



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