ReflectionExtensions.IsObsolete method

Version 1.1.28
.NET Framework 4.8
Namespace Skybrud.Essentials.Reflection.Extensions
Assembly Skybrud.Essentials.dll

IsObsolete(MemberInfo)

Extension method

Returns whether the specified member is marked as obsolete.

public static bool IsObsolete(this MemberInfo member)

Parameters

member MemberInfo

The member.

Returns

true if the member has been marked as obsolete; otherwise false.

IsObsolete(MemberInfo, out ObsoleteAttribute)

Static

Returns whether the specified member is marked as obsolete.

public static bool IsObsolete(MemberInfo member, ObsoleteAttribute attribute)

Parameters

member MemberInfo

The member.

attribute ObsoleteAttribute

An instance of ObsoleteAttribute if the member has been marked as obsolete.

Returns

true if the member has been marked as obsolete; otherwise false.

IsObsolete(Enum)

Extension method

Returns whether the specified enum value is marked as obsolete.

public static bool IsObsolete(this Enum value)

Parameters

value Enum

The enum value.

Returns

true if the enum value has been marked as obsolete; otherwise false.

IsObsolete(Enum, out ObsoleteAttribute)

Extension method

Returns whether the specified value is marked as obsolete.

public static bool IsObsolete(this Enum value, ObsoleteAttribute attribute)

Parameters

value Enum

The enum value.

attribute ObsoleteAttribute

An instance of ObsoleteAttribute if the enum value has been marked as obsolete.

Returns

true if the enum value has been marked as obsolete; otherwise false.

IsObsolete(Type)

Extension method

Returns whether the specified type is marked as obsolete.

public static bool IsObsolete(this Type type)

Parameters

type Type

The type.

Returns

true if the member has been marked as obsolete; otherwise false.

IsObsolete(Type, out ObsoleteAttribute)

Static

Returns whether the specified type is marked as obsolete.

public static bool IsObsolete(Type type, ObsoleteAttribute attribute)

Parameters

type Type

The type.

attribute ObsoleteAttribute

An instance of ObsoleteAttribute if the type has been marked as obsolete.

Returns

true if the type has been marked as obsolete; otherwise false.