Click here to Skip to main content
11,416,572 members (68,300 online)
Click here to Skip to main content
Articles » Languages » C# » Enumerations » Downloads
Add your own
alternative version

Enum Generitized

, 12 May 2007 CPOL
Using Generics to make a different kind of enumeration: easy to comment, and supports many types.
<?xml version="1.0"?>
<doc>
    <assembly>
        <name>EnumGeneritized</name>
    </assembly>
    <members>
        <member name="T:ThreeOaks.EnumGeneritized.DateTimeInstanceEnum">
            <summary>
            A class to inherit from to create String like enumerations.
            Having a public constant for each value will help developers in assigning string values.
            </summary>
        </member>
        <member name="M:ThreeOaks.EnumGeneritized.DateTimeInstanceEnum.#ctor">
            <summary>
            Constructor that must be called to set internal array of values.
            </summary>
        </member>
        <member name="M:ThreeOaks.EnumGeneritized.DateTimeInstanceEnum.#ctor(System.DateTime)">
            <summary>
            Constructor that must be called to set internal array of values.
            </summary>
        </member>
        <member name="F:ThreeOaks.EnumGeneritized.DateTimeInstanceEnum._values">
            <summary>
            Using a private array to store values found from reflection
            Use the array to check values quickly.
            Don't expect a lot of values.
            Could possible open up for loading values one time from a database
            like Lhotka CLSA read only collection class.
            </summary>
        </member>
        <member name="F:ThreeOaks.EnumGeneritized.DateTimeInstanceEnum._value">
            <summary>
            Stores assigned value
            </summary>
        </member>
        <member name="F:ThreeOaks.EnumGeneritized.DateTimeInstanceEnum._isValueSet">
            <summary>
            Holds if value for instance has been set
            </summary>
        </member>
        <member name="M:ThreeOaks.EnumGeneritized.DateTimeInstanceEnum.GetValues">
            <summary>
            Returns a clone of the available values.
            </summary>
        </member>
        <member name="M:ThreeOaks.EnumGeneritized.DateTimeInstanceEnum.GetNames">
            <summary>
            Returns a clone of the available values.
            </summary>
        </member>
        <member name="M:ThreeOaks.EnumGeneritized.DateTimeInstanceEnum.GetNamedValues">
            <summary>
            Two dimensional string array with first dimension as the enum names,
            the second dimension containing the enum values converted to string.
            </summary>
            <returns>two dimensional string array</returns>
        </member>
        <member name="M:ThreeOaks.EnumGeneritized.DateTimeInstanceEnum.GetNameForValue(System.DateTime)">
            <summary>
            For the supplied value, returns corresponding Name
            Returns zero length string if value not found.
            </summary>
        </member>
        <member name="M:ThreeOaks.EnumGeneritized.DateTimeInstanceEnum.GetNamedValuesTable">
            <summary>
            Returns a DataTable with two columns,
            the first for the Name
            the second for the Value
            </summary>
        </member>
        <member name="P:ThreeOaks.EnumGeneritized.DateTimeInstanceEnum.IsValueSet">
            <summary>
            Indicates if the enum's value has been set.
            </summary>
        </member>
        <member name="P:ThreeOaks.EnumGeneritized.DateTimeInstanceEnum.Value">
            <summary>
            The enum value.
            </summary>
        </member>
        <member name="P:ThreeOaks.EnumGeneritized.DateTimeInstanceEnum.Name">
            <summary>
            Returns the name of the assigned value.
            </summary>
        </member>
        <member name="T:ThreeOaks.EnumGeneritized.DateTimeEnumClass">
            <summary>
            A class to inherit from to create DateTime like enumerations.
            Having a public constant for each value will help developers in assigning DateTime values.
            </summary>
        </member>
        <member name="M:ThreeOaks.EnumGeneritized.DateTimeEnumClass.#ctor">
            <summary>
            Constructor that must be called to set internal array of values.
            </summary>
        </member>
        <member name="M:ThreeOaks.EnumGeneritized.DateTimeEnumClass.#ctor(System.DateTime)">
            <summary>
            Constructor where the value may be set.
            </summary>
            <param name="setValue">value to set to.</param>
        </member>
        <member name="M:ThreeOaks.EnumGeneritized.DateTimeEnumClass.Initialize">
            <summary>
            Set internal arrays and dictionaries to hold values.
            </summary>
        </member>
        <member name="F:ThreeOaks.EnumGeneritized.DateTimeEnumClass._values">
            <summary>
            Using key collection to hold an array by child type.
            This way the values only need to load once.
            </summary>
        </member>
        <member name="F:ThreeOaks.EnumGeneritized.DateTimeEnumClass._names">
            <summary>
            Holds the names of the values per child type.
            This way the value names only need to load once.
            </summary>
        </member>
        <member name="F:ThreeOaks.EnumGeneritized.DateTimeEnumClass._value">
            <summary>
            Holds the current value.
            </summary>
        </member>
        <member name="F:ThreeOaks.EnumGeneritized.DateTimeEnumClass._isValueSet">
            <summary>
            Holds if value for instance has been set
            </summary>
        </member>
        <member name="M:ThreeOaks.EnumGeneritized.DateTimeEnumClass.GetValues">
            <summary>
            Returns a clone of the available values.
            </summary>
        </member>
        <member name="M:ThreeOaks.EnumGeneritized.DateTimeEnumClass.GetNames">
            <summary>
            Returns a clone of the available values.
            </summary>
        </member>
        <member name="M:ThreeOaks.EnumGeneritized.DateTimeEnumClass.GetNamedValues">
            <summary>
            Two dimensional string array with first dimension as the "row",
            the second dimension containing the "column".
            Column 0 is name, Column 1 is the value
            </summary>
            <returns>two dimensional string array</returns>
        </member>
        <member name="M:ThreeOaks.EnumGeneritized.DateTimeEnumClass.GetNameForValue(System.DateTime)">
            <summary>
            For the supplied value, returns corresponding Name
            Returns zero length string if value not found.
            </summary>
        </member>
        <member name="M:ThreeOaks.EnumGeneritized.DateTimeEnumClass.GetNamedValuesTable">
            <summary>
            Returns a DataTable with two columns,
            the first for the Name
            the second for the Value
            </summary>
        </member>
        <member name="P:ThreeOaks.EnumGeneritized.DateTimeEnumClass.IsValueSet">
            <summary>
            Indicates if the enum's value has been set.
            </summary>
        </member>
        <member name="P:ThreeOaks.EnumGeneritized.DateTimeEnumClass.Value">
            <summary>
            The enum value.
            </summary>
        </member>
        <member name="P:ThreeOaks.EnumGeneritized.DateTimeEnumClass.Name">
            <summary>
            Returns the name of the assigned value.
            </summary>
        </member>
        <member name="T:ThreeOaks.EnumGeneritized.GenericEnumClass`1">
            <summary>
            A class to inherit from to create enumerations.
            Having a public constant for each value will help developers in assigning values.
            </summary>
        </member>
        <member name="M:ThreeOaks.EnumGeneritized.GenericEnumClass`1.#ctor">
            <summary>
            Constructor that must be called to set internal array of values.
            </summary>
        </member>
        <member name="M:ThreeOaks.EnumGeneritized.GenericEnumClass`1.#ctor(`0)">
            <summary>
            Constructor where the value may be set.
            </summary>
            <param name="setValue">value to set to.</param>
        </member>
        <member name="M:ThreeOaks.EnumGeneritized.GenericEnumClass`1.Initialize">
            <summary>
            Set internal arrays and dictionaries to hold values.
            </summary>
        </member>
        <member name="F:ThreeOaks.EnumGeneritized.GenericEnumClass`1._values">
            <summary>
            Using key collection to hold an array by child type.
            This way the values only need to load once.
            </summary>
        </member>
        <member name="F:ThreeOaks.EnumGeneritized.GenericEnumClass`1._names">
            <summary>
            Holds the names of the values per child type.
            This way the value names only need to load once.
            </summary>
        </member>
        <member name="F:ThreeOaks.EnumGeneritized.GenericEnumClass`1._value">
            <summary>
            Holds the current value.
            </summary>
        </member>
        <member name="F:ThreeOaks.EnumGeneritized.GenericEnumClass`1._isValueSet">
            <summary>
            Holds if value for instance has been set
            </summary>
        </member>
        <member name="M:ThreeOaks.EnumGeneritized.GenericEnumClass`1.GetValues">
            <summary>
            Returns a clone of the available values.
            </summary>
        </member>
        <member name="M:ThreeOaks.EnumGeneritized.GenericEnumClass`1.GetNames">
            <summary>
            Returns a clone of the available values.
            </summary>
        </member>
        <member name="M:ThreeOaks.EnumGeneritized.GenericEnumClass`1.GetNamedValues">
            <summary>
            Two dimensional object array with first dimension as the "row",
            the second dimension containing the "column".
            Column 0 is name, Column 1 is the value
            </summary>
            <returns>two dimensional string array</returns>
        </member>
        <member name="M:ThreeOaks.EnumGeneritized.GenericEnumClass`1.GetNameForValue(`0)">
            <summary>
            For the supplied value, returns corresponding Name
            Returns zero length string if value not found.
            </summary>
        </member>
        <member name="M:ThreeOaks.EnumGeneritized.GenericEnumClass`1.GetNamedValuesTable">
            <summary>
            Returns a DataTable with two columns,
            the first for the Name
            the second for the Value
            </summary>
        </member>
        <member name="P:ThreeOaks.EnumGeneritized.GenericEnumClass`1.Value">
            <summary>
            The enum value.
            </summary>
        </member>
        <member name="P:ThreeOaks.EnumGeneritized.GenericEnumClass`1.IsValueSet">
            <summary>
            Indicates if the enum's value has been set.
            </summary>
        </member>
        <member name="P:ThreeOaks.EnumGeneritized.GenericEnumClass`1.Name">
            <summary>
            Returns the name of the assigned value.
            </summary>
        </member>
        <member name="T:ThreeOaks.EnumGeneritized.StringEnumClass">
            <summary>
            A class to inherit from to create String like enumerations.
            Having a public constant for each value will help developers in assigning string values.
            </summary>
        </member>
        <member name="M:ThreeOaks.EnumGeneritized.StringEnumClass.#ctor">
            <summary>
            Constructor that must be called to set internal array of values.
            </summary>
        </member>
        <member name="M:ThreeOaks.EnumGeneritized.StringEnumClass.#ctor(System.String)">
            <summary>
            Constructor where the value may be set.
            </summary>
            <param name="setValue">value to set to.</param>
        </member>
        <member name="M:ThreeOaks.EnumGeneritized.StringEnumClass.Initialize">
            <summary>
            Set internal arrays and dictionaries to hold values.
            </summary>
        </member>
        <member name="F:ThreeOaks.EnumGeneritized.StringEnumClass._values">
            <summary>
            Using key collection to hold an array by child type.
            This way the values only need to load once.
            </summary>
        </member>
        <member name="F:ThreeOaks.EnumGeneritized.StringEnumClass._names">
            <summary>
            Holds the names of the values per child type.
            This way the value names only need to load once.
            </summary>
        </member>
        <member name="F:ThreeOaks.EnumGeneritized.StringEnumClass._value">
            <summary>
            Holds the current value.
            </summary>
        </member>
        <member name="F:ThreeOaks.EnumGeneritized.StringEnumClass._isValueSet">
            <summary>
            Holds if value for instance has been set
            </summary>
        </member>
        <member name="M:ThreeOaks.EnumGeneritized.StringEnumClass.GetValues">
            <summary>
            Returns a clone of the available values.
            </summary>
        </member>
        <member name="M:ThreeOaks.EnumGeneritized.StringEnumClass.GetNames">
            <summary>
            Returns a clone of the available values.
            </summary>
        </member>
        <member name="M:ThreeOaks.EnumGeneritized.StringEnumClass.GetNamedValues">
            <summary>
            Two dimensional string array with first dimension as the "row",
            the second dimension containing the "column".
            Column 0 is name, Column 1 is the value
            </summary>
            <returns>two dimensional string array</returns>
        </member>
        <member name="M:ThreeOaks.EnumGeneritized.StringEnumClass.GetNameForValue(System.String)">
            <summary>
            For the supplied value, returns corresponding Name
            Returns zero length string if value not found.
            </summary>
        </member>
        <member name="M:ThreeOaks.EnumGeneritized.StringEnumClass.GetNamedValuesTable">
            <summary>
            Returns a DataTable with two columns,
            the first for the Name
            the second for the Value
            </summary>
        </member>
        <member name="P:ThreeOaks.EnumGeneritized.StringEnumClass.Value">
            <summary>
            The enum value.
            </summary>
        </member>
        <member name="P:ThreeOaks.EnumGeneritized.StringEnumClass.IsValueSet">
            <summary>
            Indicates if the enum's value has been set.
            </summary>
        </member>
        <member name="P:ThreeOaks.EnumGeneritized.StringEnumClass.Name">
            <summary>
            Returns the name of the assigned value.
            </summary>
        </member>
        <member name="T:ThreeOaks.EnumGeneritized.StringEnumInstance">
            <summary>
            A class to inherit from to create String like enumerations.
            Having a public constant for each value will help developers in assigning string values.
            </summary>
        </member>
        <member name="M:ThreeOaks.EnumGeneritized.StringEnumInstance.#ctor">
            <summary>
            Constructor that must be called to set internal array of values.
            </summary>
        </member>
        <member name="F:ThreeOaks.EnumGeneritized.StringEnumInstance._values">
            <summary>
            Using a private array to store values found from reflection
            Use the array to check values quickly.
            Don't expect a lot of values.
            Could possible open up for loading values one time from a database
            like Lhotka CLSA read only collection class.
            </summary>
        </member>
        <member name="M:ThreeOaks.EnumGeneritized.StringEnumInstance.GetValues">
            <summary>
            Returns a clone of the available values.
            </summary>
        </member>
        <member name="M:ThreeOaks.EnumGeneritized.StringEnumInstance.GetNames">
            <summary>
            Returns a clone of the available values.
            </summary>
        </member>
        <member name="M:ThreeOaks.EnumGeneritized.StringEnumInstance.GetNamedValues">
            <summary>
            Two dimensional string array with first dimension as the enum names,
            the second dimension containing the enum values.
            </summary>
            <returns>two dimensional string array</returns>
        </member>
        <member name="M:ThreeOaks.EnumGeneritized.StringEnumInstance.GetNameForValue(System.String)">
            <summary>
            For the supplied value, returns corresponding Name
            Returns zero length string if value not found.
            </summary>
        </member>
        <member name="M:ThreeOaks.EnumGeneritized.StringEnumInstance.GetNamedValuesTable">
            <summary>
            Returns a DataTable with two columns,
            the first for the Name
            the second for the Value
            </summary>
        </member>
        <member name="P:ThreeOaks.EnumGeneritized.StringEnumInstance.IsValueSet">
            <summary>
            Determines if the enum has been assigned a value.
            True if it has.
            </summary>
        </member>
        <member name="P:ThreeOaks.EnumGeneritized.StringEnumInstance.Value">
            <summary>
            The enum value.
            </summary>
        </member>
        <member name="P:ThreeOaks.EnumGeneritized.StringEnumInstance.Name">
            <summary>
            Returns the name of the assigned value.
            </summary>
        </member>
    </members>
</doc>

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)

Share

About the Author

Tim Schwallie
Team Leader
United States United States
A biography in this little spot...sure.
I've worked at GTE HawaiianTel. I've worked at Nuclear Plants. I've worked at Abbott Labs. I've consulted to Ameritech Cellular. I've consulted to Zurich North America. I've consulted to International Truck and Engine. Right now, I've consulted to Wachovia Securities to help with various projects. I've been to SHCDirect and now at Cision.

During this time, I've used all kinds of tools of the trade. Keeping it to the more familier tools, I've used VB3 to VB.NET, ASP to ASP/JAVASCRIPT/XML to ASP.NET. Currently, I'm developing with C# and ASP.NET. I built reports in Access, Excel, Crystal Reports, and Business Objects (including the Universes and ETLS). Been a DBA on SQL Server 4.2 to 2000 and a DBA for Oracle. I've built OLTP databases and DataMarts. Heck, I've even done Documentum. I've been lucky to have created software for the single user to thousands of concurrent users.

I consider myself fortunate to have met many different people and worked in many environments. It's through these experiences I've learned the most.

| Advertise | Privacy | Terms of Use | Mobile
Web03 | 2.8.150427.4 | Last Updated 12 May 2007
Article Copyright 2007 by Tim Schwallie
Everything else Copyright © CodeProject, 1999-2015
Layout: fixed | fluid