Implemented C# 6.0 features, fixed most of resharper's code quality suggestions.
This commit is contained in:
@@ -10,7 +10,7 @@ namespace Filtration.ObjectModel.Extensions
|
||||
var type = enumVal.GetType();
|
||||
var memInfo = type.GetMember(enumVal.ToString());
|
||||
var attributes = memInfo[0].GetCustomAttributes(typeof(T), false);
|
||||
return (attributes.Length > 0) ? (T)attributes[0] : null;
|
||||
return attributes.Length > 0 ? (T)attributes[0] : null;
|
||||
}
|
||||
|
||||
public static string GetAttributeDescription(this Enum enumValue)
|
||||
|
||||
Reference in New Issue
Block a user