diff --git a/src/NetFabric.Reflection/NetFabric.Reflection.csproj b/src/NetFabric.Reflection/NetFabric.Reflection.csproj index 66a017f..9a65042 100644 --- a/src/NetFabric.Reflection/NetFabric.Reflection.csproj +++ b/src/NetFabric.Reflection/NetFabric.Reflection.csproj @@ -1,7 +1,7 @@  - net6.0;net7.0 + netstandard2.1;net5.0;net7.0 NetFabric.Reflection 5.0.0 Extensions to System.Reflection. diff --git a/src/NetFabric.Reflection/Reflection/TypeExtensions.cs b/src/NetFabric.Reflection/Reflection/TypeExtensions.cs index efde935..f863f7a 100644 --- a/src/NetFabric.Reflection/Reflection/TypeExtensions.cs +++ b/src/NetFabric.Reflection/Reflection/TypeExtensions.cs @@ -117,7 +117,7 @@ public static bool ImplementsInterface(this Type type, Type interfaceType, [NotN internal static MethodInfo? GetPublicMethod(this Type type, string name, params Type[] types) { - var method = type.GetMethod(name, PublicInstance, types); + var method = type.GetMethod(name, PublicInstance, null, types, null); if (method is not null) return method; @@ -235,7 +235,10 @@ public static bool IsIntegerType(this Type type) /// public static bool IsFloatingPointType(this Type type) { - if (type == typeof(Half) || + if ( +#if NET5_0_OR_GREATER + type == typeof(Half) || +#endif type == typeof(float) || type == typeof(double) || type == typeof(decimal))