c# - Trouble checking dynamic entity -


greetings,

a old colleague of mine made code:

public abstract class pagedviewmodelbase<t> : partnerviewmodelbase, ipagedcollectionview t : entity, ieditableobject, new() 

now want check type/value of t.. i've tried using "t model gives me error "'t' 'type parameter' used 'variable'".

how can check if "t" of particular model ?

you try following check

typeof(t) == typeof(model) 

Comments