You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
33 lines
404 B
C#
33 lines
404 B
C#
|
|
#if NETFX_CORE
|
|
|
|
using System;
|
|
using System.Reflection;
|
|
|
|
namespace SRF
|
|
{
|
|
|
|
public static class NetFxExtensions
|
|
{
|
|
|
|
|
|
public static bool IsAssignableFrom(this Type @this, Type t)
|
|
{
|
|
|
|
return @this.GetTypeInfo().IsAssignableFrom(t.GetTypeInfo());
|
|
|
|
}
|
|
|
|
public static bool IsInstanceOfType(this Type @this, object obj)
|
|
{
|
|
|
|
return @this.IsAssignableFrom(obj.GetType());
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
#endif
|