DotNext by .NET Foundation and Contributors

<PackageReference Include="DotNext" Version="4.0.0-rc.1" />

 CustomAttribute

public static class CustomAttribute
Contains static methods for retrieving custom attributes.
using System; using System.Reflection; using System.Runtime.CompilerServices; namespace DotNext.Reflection { public static class CustomAttribute { [System.Runtime.CompilerServices.NullableContext(1)] public static bool IsDefined<[System.Runtime.CompilerServices.Nullable(0)] TAttribute>(this ICustomAttributeProvider member, bool inherit = false) where TAttribute : Attribute { return member.IsDefined(typeof(TAttribute), inherit); } } }