Click here to Skip to main content
15,884,926 members
Articles / Programming Languages / C#

Tree Structured Enumerations

Rate me:
Please Sign up or sign in to vote.
3.32/5 (6 votes)
2 Apr 2008CPOL3 min read 75.2K   234   15  
The way to maintain a tree structured enumeration while having all the advantages of the standard ones
using System;

namespace TreeStructuredEnumerations
{
    [AttributeUsage(AttributeTargets.Enum)]
    public class StructuredAttribute : Attribute
    {
        public int span;

        public int Span
        {
            get { return span; }
            set { span = value; }
        }

        public StructuredAttribute(int span)
        {
            this.span = span;
        }
    }

}

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


Written By
Software Developer
Czech Republic Czech Republic
Contacts: EMAIL - smartk8@gmail.com

Comments and Discussions