PC Review


Reply
Thread Tools Rate Thread

TypeOf or Enumeration ?

 
 
pamelafluente@libero.it
Guest
Posts: n/a
 
      18th Oct 2006
Hi guys,

When deriving classes from a base class, I often find myself to use an
enumeration
to keep track fo the derived object type. I set it at New().

(I am aware that using overrides I hardly need to keep track of the
derived types,
but there are situation where they need to be "sorted out". )

This way I do not have to use TypeOf when I need to determine the
type of the derived class (for instance when doing some iteration
on parent objects).

I find handy to use the enumeration and also have a suspect it
can be slightly faster than TypeOf.

I would like to hear your opinion on this practice.

-P

 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
typeof Peter Kirk Microsoft C# .NET 4 16th Jun 2005 11:13 PM
Re: typeof =?ISO-8859-1?Q?Lasse_V=E5gs=E6ther_Karlsen?= Microsoft C# .NET 0 29th Dec 2004 10:19 AM
passing enumeration parameter to generic (all enumeration) sub JackRazz Microsoft C# .NET 8 30th Mar 2004 09:10 PM
passing enumeration parameter to generic (all enumeration) sub JackRazz Microsoft VB .NET 8 30th Mar 2004 09:10 PM
typeof boxim Microsoft C# .NET 1 20th Aug 2003 06:52 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 12:57 PM.