Created
December 18, 2012 20:41
-
-
Save iggym/4331765 to your computer and use it in GitHub Desktop.
all types implementing an interface
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
//Loop assemblies ,loop types, check if implemented | |
var type = typeof(IMyInteraface); | |
var types = AppDomain.CurrentDomain.GetAssemblies().ToList() | |
.SelectMany(s => s.GetTypes()) | |
.Where(p => type.IsAssignableFrom(p)); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment