Information.IsNothing(Object) 메서드

정의

식에 Boolean 할당된 개체가 없는지 여부를 나타내는 값을 반환합니다.

public:
 static bool IsNothing(System::Object ^ Expression);
public static bool IsNothing(object Expression);
static member IsNothing : obj -> bool
Public Function IsNothing (Expression As Object) As Boolean

매개 변수

Expression
Object

필수 사항입니다. Object 표현.

반품

식에 Boolean 할당된 개체가 없는지 여부를 나타내는 값을 반환합니다.

예제

다음 예제에서는 함수를 IsNothing 사용하여 개체 변수가 개체 인스턴스와 연결되어 있는지 확인합니다.

Dim testVar As Object
' No instance has been assigned to variable testVar yet.
Dim testCheck As Boolean
' The following call returns True.
testCheck = IsNothing(testVar)
' Assign a string instance to variable testVar.
testVar = "ABCDEF"
' The following call returns False.
testCheck = IsNothing(testVar)
' Disassociate variable testVar from any instance.
testVar = Nothing
' The following call returns True.
testCheck = IsNothing(testVar)

설명

IsNothing 는 식이 현재 할당된 개체가 없는 개체 변수를 나타내면 반환 True 하고, 그렇지 않으면 반환됩니다 False.

IsNothing 는 참조 형식에서 작동하기 위한 것입니다. 값 형식은 Nothing 값을 보유할 수 없으며 할당 Nothing 하는 경우 기본값으로 되돌려 줍니다. 값 형식 ExpressionIsNothing 을 제공하는 경우 항상 .를 반환합니다False.

적용 대상

추가 정보