Finding extension methods

6 views
Skip to first unread message

Keith

unread,
Sep 15, 2008, 11:11:31 AM9/15/08
to mono-cecil
How do I tell if a method is an extension method? I.e. has "this" on
its first argument?
TIA, -- Keith

Jb Evain

unread,
Sep 15, 2008, 11:28:59 AM9/15/08
to mono-...@googlegroups.com
Hey,

On 9/15/08, Keith <ke...@kuler.com> wrote:
> How do I tell if a method is an extension method? I.e. has "this" on
> its first argument?

Extension methods are just static methods that are decorated with a
System.Runtime.CompilerServices.ExtensionAttribute.

--
Jb Evain <j...@nurv.fr>

Keith

unread,
Sep 15, 2008, 12:00:45 PM9/15/08
to mono-cecil
Aha, there it is. I had thought to look at attributes on the
parameter, but silly me, I missed attributes on the method itself.
Thanks!
-- Keith
Reply all
Reply to author
Forward
0 new messages