LIST(OF T) 使用lambada運算式時如何過濾空值?
假設有個類record中有姓名、性別、身份證號等一些屬性,都可以為空
dim data as list(of record) '假定這個
dim query=data.AsQueryable.Where(function(p) p.姓名 isnot nothing).tolist
用上面的方法可以查詢等到某個屬性不為空的資料,但我查詢的屬性不確定是哪一個,紅色部份想用Expression(Of Func(Of record, Boolean))動態生成,該如何做呢?
轉載請註明出處,本文鏈接:https://www.uj5u.com/net/244488.html
標籤:VB.NET
