T
IdeaBlade DevForce 2010 Help Reference
Not<T> Method
See Also  Example Send Feedback
IdeaBlade.Linq Assembly > IdeaBlade.Linq Namespace > PredicateBuilder Class : Not<T> Method



expr
Returns a NOT'd version of the specified expression.

Syntax

Visual Basic (Declaration) 
Public Shared Function Not(Of T)( _
   ByVal expr As Expression(Of Func(Of T,Boolean)) _
) As Expression(Of Func(Of T,Boolean))
Visual Basic (Usage)Copy Code
Dim expr As Expression(Of Func(Of T,Boolean))
Dim value As Expression(Of Func(Of T,Boolean))
 
value = PredicateBuilder.Not(Of T)(expr)
C++/CLI 
public:
static Expression<Func<T^,bool>^>^ Notgeneric<typename T>
( 
   Expression<Func<T^,bool>^>^ expr
) 

Parameters

expr

Type Parameters

T

Example

C#Copy Code
public void NotQuery() {
  var mgr = new DomainModelEntityManager();
  Expression<Func<Customer, bool>> crit1 = c => c.Country.Equals("Mexico");
  var finalcrit = PredicateBuilder.Not(crit1);
  var results = mgr.Customers.Where(finalcrit).ToList();
}

Requirements

Target Platforms: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family, Windows Vista, Windows Server 2008 family

See Also

© 2013 All Rights Reserved.