Created
April 9, 2014 11:27
-
-
Save lmatt-bit/10257526 to your computer and use it in GitHub Desktop.
Call generic template method from name rather than template
This file contains hidden or 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
| Type type = SchemaAssemblyUtility.GetType(schemaName); | |
| var method = typeof(SchemaContext).GetMethod("CreateModel"); | |
| var genericMethod = method.MakeGenericMethod(type);//Here use type | |
| return genericMethod.Invoke(schemaContext, null); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment