Do you happen to have an extension method for this? :) On Fri, Mar 4, 2011 at 12:21 PM, Daniel Grunwald <[email protected]> wrote: > You mean anonymous methods / lambdas? > That's not possible; there isn't any unique attribute identifying them. > > The logic we're currently using in ILSpy is: > 1) Method name must start with "<" > 2) The [CompilerGenerated] attribute must be applied to the method or to > one of the method's declaring types (doesn't have to be the direct > containing type if there are nested lambdas) > 3) The method must be declared in the current class or in one of its > nested classes. > > Daniel > > On 3/4/2011 17:35, Greg Young wrote: >> Is there any way to reliably find delegate methods? I know I can >> identify them as compiler generated. I also know they follow a naming >> standard but would prefer to not lock myself into such decisions by >> the compiler writer. >> >> My guess is that I will have to make the latter dependency but if >> anyone has another way? > > >
-- Les erreurs de grammaire et de syntaxe ont été incluses pour m'assurer de votre attention -- -- mono-cecil
