简体   繁体   中英

Comparing object with Nothing in vb.net

I have a code

Dim drQues As DataRow = dtQuestion.AsEnumerable()
             .First(Function(uqno) uqno.Field(Of Int32)("uniqueqno") = drqno("uniqueqno"))

I want to check if drQues is Nothing

I tried

If Not drQues <> Nothing THEN

but it says

<> is not defined for System.Data.DataRow and System.Data.DataRow

how can I check if there was a row for specified condition in linq?

如果未定义常规比较运算符,请使用IsIsNot

If drQues Is Nothing Then

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM