Created
April 9, 2014 11:28
-
-
Save lmatt-bit/10257630 to your computer and use it in GitHub Desktop.
Test if a type is IList<>(generic type)
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
| public static bool IsList(Type type) | |
| { | |
| return type != null && type.GetGenericTypeDefinition() == typeof(IList<>); | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment