我一直在浏览一个旧的VB6代码,我看到了这样的东西
Set AST = CreateObject("ADODB.Stream")
Run Code Online (Sandbox Code Playgroud)
我有使用VB6和VB.NET的经验,但我Set之前从未在我的VB6项目中使用过这个关键字.我在互联网上研究了很多东西是什么用途,Set我只知道Properties其中的用法只有我在VB.NET中知道
Public Property myProperty As String
Get
Return _myProperty
End Get
Set(value as String)
_myProperty = value
End Set
End Property
Run Code Online (Sandbox Code Playgroud)
我认为Set上面的代码使用不同.这两种方法有什么区别?我想知道Set在VB6中做了什么