Change obsolete use of Enum.ToString

pull/30/head
David Hall 2019-01-16 08:07:00 -07:00
parent 0f1acd2276
commit c8122aef53
1 changed files with 1 additions and 1 deletions

View File

@ -76,7 +76,7 @@ namespace Vanara.Extensions
{
// If this is flag, return flags if there are more than one.
if (IsFlags<T>() && value.GetFlags().Count() > 1)
return value.ToString(CultureInfo.InvariantCulture);
return value.ToString();
// Get the name or description of the single enum value.
var name = Enum.GetName(typeof(T), value);
if (name != null)