ตรวจสอบว่าตัวแปรเป็น Nothing ใน vb

22 Nov 2015,
Share: 

วิธีการตรวจสอบว่าตัวแปรเป็น Nothing หรือ ไม่เป็น Nothing ใน vb ทําได้ดังนี้

ตัวแปรเป็น Nothing

If obj IsNot Nothing Then
    ...
End If

ตัวแปรไม่เป็น Nothing

If obj Is Nothing Then
    ...
End If

Copyright © 2019 - 2025 thiti.dev |  v1.59.0 |  Privacy policy | 

Build with ❤️ and Astro.

Github profile   Linkedin profile   Instagram   X profile   Nostr   Youtube channel   Telegram   Email contact   วงแหวนเว็บ