Created
July 17, 2023 12:33
-
-
Save MichalGrzegorzak/c2ee43fad625f36cac8d2a8acf58708c to your computer and use it in GitHub Desktop.
Reflection, create specific generic type
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var baseGenericType = typeof(BaseItemCollection<>); | |
var genType = tt.GetGenericArguments()[0]; | |
var specificBaseType = baseGenericType.MakeGenericType(genType); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment