Skip to content

Commit

Permalink
#5 - melhorias
Browse files Browse the repository at this point in the history
  • Loading branch information
matmiranda committed Aug 16, 2023
1 parent b783310 commit 9880292
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions PagBank/Extension/EnumExtension.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ public static class EnumExtension
public static string GetDescription(this BaseUrl value)
{
var type = value.GetType();
var memberInfo = type.GetMember(value.ToString());
var attributes = memberInfo[0].GetCustomAttributes(typeof(DescriptionAttribute), false);
var memberInfo = type.GetMember(value.ToString())[0];
var attributes = memberInfo.GetCustomAttributes(typeof(DescriptionAttribute), false);
return ((DescriptionAttribute)attributes[0]).Description;
}
}
Expand Down

0 comments on commit 9880292

Please sign in to comment.