GeekArticles
Database
SQL Server
Database
SQL ServerDefining Descriptive Text for Enumeration Members
<p>
An <a is a special type in the .NET Framework that is comprised of a number of named constants.
While you might not have created an enumeration type yourself, you have likely used enumerations many times in day-to-day programming. For example, the rows in a
GridView have a <a property</a> that returns an
enumeration of type <a that
indicates the type: <code>Header</code>, <code>Footer</code>, <code>DataRow</code>, and so on.
</p><p>
When working with an enumeration we may need to display a descriptive message based on the value. For example, using <a system</a> you can programmatically create a new user account calling the <a <a method</a>. This method specifies the success or failure of the
operation via the <a enumeration</a>.
This enumeration has members like <code>Success</code>, <code>InvalidUserName</code>, <code>InvalidPassword</code>, <code>DuplicateUserName</code>, and the like. When
calling this method from an ASP.NET page you might want to show the user a descriptive message based on this enumeration value.
</p><p>
This article explores three different ways to provide descriptive text for enumeration members. Read on to learn more!
<br /><a More ></a></p>
Sponsored Links
Related Topics
Subscribe via RSS
SQL Server
- Naming Database Objects: Part II
- Trace Messages Part V: Trace Cleanup
- Naming Database Objects: Part I
- Multiple-Child Aggregation
- Creating SQL Tables for an Integrating Application Using Dexterity
- SQL Server 2005 Beta 2 Transact-SQL Enhancements
- .NET Rocks! - Brian Larson on SQL Server Reporting Services
- Computing the Trimmed Mean in SQL
- SQL Server 2000 Gains on Oracle
- Separator First Formatting (SFF)
