/// Gets the description of the Enumeration provided.
public string GetEnumDescription(Enum value)
{
return
value
.GetType()
.GetMember(value.ToString())
.FirstOrDefault()
.GetCustomAttribute()
?.Description;
}
The best resource for .NET Developers. This blog guides about .NET (C#.NET, ASP.NET, ASP.NET MVC, SQL Server, ADO.NET), AngularJS, JSON, HTML, JavaScript, jQuery, CSS, Bootstrap, DotNetNuke, and .NET interview questions. This blog teaches everything about the .NET. Here you can find bunch of tutorials, Tips and tricks, code samples and examples.
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment