Hi,

On Fri, Mar 25, 2011 at 8:22 PM, Gábor Kozár <[email protected]> wrote:
> string guid = interfaceTypeDef.CustomAttributes.FirstOrDefault(ca =>
> ca.AttributeType == interfaceTypeDef.Module.Import(typeof
> (System.Runtime.InteropServices.GuidAttribute))).ConstructorArguments[0].Value.ToString();

The == will fail here.

Just write:

string guid = (string) iface.CustomAttributes.First (ca =>
ca.AttributeType.FullName ==
"System.Runtime.InteropServices.GuidAttribute").ConstructorArguments[0].Value;

Jb

-- 
--
mono-cecil

Reply via email to