Reflection: getting types implemented interfaces in C#
Forums:
//SampleLib.MacBook - full class name
//SampleLib - assembly name
var macType = Type.GetType("SampleLib.MacBook, SampleLib");
//show interfaces
var interfaces = macType.GetInterfaces();
foreach (var i in interfaces) {
Console.WriteLine(i.Name);
}
- Log in to post comments