Understanding LINQBridge's compatibility with passing lambda functions

104 views
Skip to first unread message

msorens

unread,
Dec 6, 2009, 2:26:38 PM12/6/09
to LINQBridge
I compiled a .NET 2.0 library (with LINQBridge) that defines a class
having a property whose value is a lambda function:

public Func<string, bool> RestrictionLambda { get; set; }

If I use that class in a .NET 2.0 application it compiles and runs
just fine--without having to add a reference to LINQBridge.

If, however, I attempt to compile it in a .NET 3.5 application I get
this error:

The type 'System.Func`2<T0,T1>' is defined in an assembly that is not
referenced. You must add a reference to assembly 'LinqBridge,
Version=1.0.0.0, Culture=neutral, PublicKeyToken=c2b14eb747628076'.

I went ahead and added a reference to LINQBridge and then it compiled
clean.

(1) Does this cause any issues since a reference to System.Xml.Linq is
also present?
(2) Is there a cleaner way to define my property to avoid the need for
LINQBridge in a .NET 3.5 app?

Thank you!

Reply all
Reply to author
Forward
0 new messages