IntelliSense is telling me "Expression cannot contain anonymous methods or lambda expressions." Really? I was not aware of this imposed limitation. Is this correct? I guess I'm looking for a sanity check here...


public delegate bool Bar(string s);

[AttributeUsage(AttributeTargets.All)]
public class Foo : Attribute
{
    public readonly Bar bar;

    public Foo(Bar bar)
    {
        this.bar = bar;
    }
}

public class Usage
{
    [Foo(b => b == "Hello World!")]        // IntelliSense Complains here
    public Usage()
    {
    }
}
Edit
Report