Click here to Skip to main content
Click here to Skip to main content
Articles » Languages » C# » Enumerations » Downloads
 

Enum Generitized

By , 12 May 2007
 
using System;
using ThreeOaks.EnumGeneritized;

namespace Enums
{
	/// <summary>
	/// Enumeration with value A,B,C
	/// </summary>
	[Serializable()]
	public class TestStringEnumClassABC : StringEnumClass
	{
        /// <summary>
        /// Constructor that sets the value upon instantiation
        /// </summary>
        public TestStringEnumClassABC() : base() { }
        /// <summary>
        /// Constructor that sets the value upon instantiation
        /// </summary>
        public TestStringEnumClassABC(string setDate) : base(setDate) { }

		/// <summary>
		/// A for A
		/// </summary>
		public static readonly string A = "A";
		/// <summary>
		/// B for B
		/// </summary>
		public static readonly string B = "B";
		/// <summary>
		/// C for C
		/// </summary>
		public static readonly string C = "C";
	}

	/// <summary>
	/// Enumeration with values X,Y,Z
	/// </summary>
	[Serializable()]
	public class TestStringEnumClassXYZ : StringEnumClass
	{
		public static readonly string X = "X";
		public static readonly string Y = "Y";
		public static readonly string Z = "Z";
	}

	/// <summary>
	/// Enumeration with a bad value, not a string.
	/// </summary>
	[Serializable()]
	public class TestStringEnumClassBad : StringEnumClass
	{
		public static readonly string X = "X";
		public static readonly string Y = "Y";
		public static readonly int i = 1;
	}

	/// <summary>
	/// Enumeration with a duplicate value.
	/// </summary>
	[Serializable()]
	public class TestStringEnumClassDuplicate : StringEnumClass
	{
		public static readonly string X = "X";
		public static readonly string Y = "Y";
		public static readonly string Z = "Y";
	}
}

By viewing downloads associated with this article you agree to the Terms of use 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)

About the Author

Tim Schwallie
Team Leader
United States United States
Member
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.

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