add utility extension to work with types
This commit is contained in:
parent
2ec5b34971
commit
e869c1e2fc
|
@ -0,0 +1,7 @@
|
||||||
|
namespace InnovEnergy.Lib.Utils;
|
||||||
|
|
||||||
|
public static class Types
|
||||||
|
{
|
||||||
|
public static Boolean Extends<T>(this Type type) => type.IsAssignableTo(typeof(T));
|
||||||
|
public static Boolean Is<T>(this Type type) => type == typeof(T);
|
||||||
|
}
|
Loading…
Reference in New Issue