Created
November 8, 2013 22:41
-
-
Save davidalpert/7378855 to your computer and use it in GitHub Desktop.
A convenience method that inverts IsAssignableFrom to be semantically more straightforward.
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
| /// <summary> | |
| /// A convenience method that inverts <see cref="IsAssignableFrom"/> to be | |
| /// semantically more straightforward. | |
| /// </summary> | |
| public static bool IsAssignableTo(this Type source, Type target) | |
| { | |
| return target.IsAssignableFrom(source); | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment