Re: Pattern: Static Properties Return Objects
Daniel Petersson <[email protected]> Wed, 30 Jan 2008 12:02:07 +0100
| Newsgroups | gmane.comp.windows.devel.dotnet.clr |
|---|---|
| Message-ID | <E8FBCCA96548DD46A1AC748F17EEAD9C0E96F6F4EB@cefalo-mail01.cefalo.local> |
If you mean something like an extended version behavior implemented by Color.Red this is sometimes refered to as the "descriptor pattern". regards, Daniel ________________________________________ From: Discussion of development on the .NET platform using any managed language [[email protected]] On Behalf Of Brady Kelly [[email protected]] Sent: Wednesday, January 30, 2008 11:52 AM To: [email protected] Subject: [DOTNET-CLR] Pattern: Static Properties Return Objects I often have a situation where my info needs progress beyond a simple enum. I then create a class, with a private constructor that takes an enum, and returns an object representing one of the enum items, but with more data. I expose static getters to construct and return each type of object, so that using the class appears as if using an enum. Is there a name for this pattern or practice? =================================== This list is hosted by DevelopMentor? http://www.develop.com View archives and manage your subscription(s) at http://discuss.develop.com =================================== This list is hosted by DevelopMentorĀ® http://www.develop.com View archives and manage your subscription(s) at http://discuss.develop.com