我正在浏览一段旧的VB6代码,发现其中有这样一段:
Set AST = CreateObject("ADODB.Stream")
我有使用VB6和VB.NET的经验,但在我的VB6项目中从未使用过Set
关键字。我在互联网上进行了大量研究,了解了Set
的用途,我所知道的仅是在VB.NET中使用Properties
时的用法。
Public Property myProperty As String
Get
Return _myProperty
End Get
Set(value as String)
_myProperty = value
End Set
End Property
我认为上述代码中使用了不同的Set
方式。这两种方法有什么区别?我想知道在VB6中,Set
是用来做什么的。
myList(index)
而不是myList.Item(index)
。 - Steven LiekensSet
上。 - Damien_The_Unbeliever