CSharp examples for System.Reflection:Type
Returns interfaces implemented by the current type
// Copyright (c) Costin Morariu. All rights reserved. using System.Reflection; using System.Collections.Generic; using System;/*from w ww . java 2 s. co m*/ public class Main{ /// <summary> /// Returns interfaces implemented by the current type /// </summary> /// <param name="type">Current type</param> /// <returns>The types of the interfaces</returns> public static IEnumerable<Type> GetInterfaces(this Type type) { return type.GetTypeInfo().ImplementedInterfaces; } }