Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- private static void PrintInterfaceMappingUsingGetInterfaceMap(Type type, Type interfaceType)
- {
- InterfaceMapping mapping = type.GetInterfaceMap(interfaceType);
- int count = mapping.InterfaceMethods.Count();
- Console.WriteLine(
- "Interface Type Name: {0}, Target Type Name: {1}",
- mapping.InterfaceType.FullName,
- mapping.TargetType.FullName);
- for (int i = 0; i < count; i++)
- {
- Console.WriteLine(
- "Interface Method: {0}, Implemented method: {0}",
- mapping.InterfaceMethods[i].Name,
- mapping.TargetMethods[i]);
- }
- }
Add Comment
Please, Sign In to add comment