
Signature
Mattias Sjögren [MVP] mattias @ mvps.org
http://www.msjogren.net/dotnet/ | http://www.dotnetinterop.com
Please reply only to the newsgroup.
> >Why not use attributes?
>
> 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.
um.... but doesn't testing if an object implements a certain interface
also require using Reflection?

Signature
Truth,
James Curran
Home: www.noveltheory.com Work: www.njtheater.com
Blog: www.honestillusion.com Day Job: www.partsearch.com
(note new day job!)
Richard Blewett [DevelopMentor] - 28 Sep 2004 23:13 GMT
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...
> >Why not use attributes?
>
> 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.
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!)
[microsoft.public.dotnet.languages.csharp]