Type checking has its own IL opcode ininst so is faster than reflection
Regards
Richard Blewett - DevelopMentor
http://staff.develop.com/richardb/weblog
nntp://news.microsoft.com/microsoft.public.dotnet.languages.csharp/<uaZO0GapEHA.1460@TK2MSFTNGP12.phx.gbl>
"Mattias Sj?gren" <mattias.dont.want.spam@mvps.org> wrote in message
news:Ogw82LZpEHA.536@TK2MSFTNGP11.phx.gbl...[color=blue]
>[color=green]
> >Why not use attributes?[/color]
>
> I don't know about Microsofts design decisions behind this. But I know
> that last time I looked, testing if an object implements a certain
> interface was significantly faster than using Reflection to check for
> the presence of an attribute.[/color]
um.... but doesn't testing if an object implements a certain interface
also require using Reflection?
--
Truth,
James Curran
Home:
www.noveltheory.com Work:
www.njtheater.com
Blog:
www.honestillusion.com Day Job:
www.partsearch.com
(note new day job!)
---
Incoming mail is certified Virus Free.
Checked by AVG anti-virus system (
http://www.grisoft.com).
Version: 6.0.770 / Virus Database: 517 - Release Date: 27/09/2004
[microsoft.public.dotnet.languages.csharp]