Is Assignable From - CSharp System.Reflection

CSharp examples for System.Reflection:Type

Description

Is Assignable From

Demo Code


using System.Reflection;
using System.Linq;
using System.Collections.Generic;
using System;/*from   w  ww  . j a v a2s.c  o  m*/

public class Main{
        public static bool IsAssignableFrom(this Type type, Type other)
        {
            return type.GetTypeInfo().IsAssignableFrom(other.GetTypeInfo());
        }
}

Related Tutorials