using System.Xml.Serialization;
public static void Main() {
var x = TNFeInfNFeDetImpostoICMSICMS00CST.item00;
Console.WriteLine(x.GetAttributeDescription());
public static class EnumExt {
public static string GetAttributeDescription(this Enum enumValue) {
var type = enumValue.GetType();
var memInfo = type.GetMember(enumValue.ToString());
var attributes = memInfo[0].GetCustomAttributes(typeof(XmlEnumAttribute), false);
return (attributes.Length > 0) ? ((XmlEnumAttribute)attributes[0]).Name : String.Empty;
public enum TNFeInfNFeDetImpostoICMSICMS00CST {