之間有什麼區別:沒有什麼設置一個值0以及.NET中variable = 0和variable = nothing之間的區別是什麼?
Dim intVal as integer
intVal = 0
和
intVal = nothing
我已經從MSDN閱讀:
從MSDN:
Public Structure testStruct
Public name As String
Public number As Short
End Structure
Dim ts As testStruct, i As Integer, b As Boolean
ts = Nothing
' The preceding statement sets ts.name to "" and ts.number to 0.
i = Nothing
b = Nothing
' The preceding statements set i to 0 and b to False.
其效果相同 – Racooon