Show / Hide Table of Contents

Class EnumExtensions

Extension methods for System.Enum.

Inheritance
System.Object
EnumExtensions
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Namespace: Sartorius.SAF.Extensions
Assembly: Sartorius.SAF.dll
Syntax
public static class EnumExtensions

Methods

View Source

GetAttributeValue<TAttribute, TType>(Enum, Func<TAttribute, TType>)

Gets the value of the given attribute.

Declaration
public static TType GetAttributeValue<TAttribute, TType>(this Enum enum, Func<TAttribute, TType> expression)
    where TAttribute : Attribute
Parameters
Type Name Description
System.Enum enum

The @enum.

System.Func<TAttribute, TType> expression

The expression.

Returns
Type Description
TType
Type Parameters
Name Description
TAttribute

The attribute type

TType

The System.Type of the attribute value.

  • View Source
Back to top Generated by DocFX