学过vb编程的请帮忙解释下这个代码的功能

来源:百度知道 编辑:UC知道 时间:2024/06/03 20:54:59
模块1
ClsOneDayData
Option Explicit

Public TheDate As Long
Public kp As Long
Public sp As Long
Public hi As Long
Public lo As Long
Public amt As Long
Public num As Long

Friend Property Get AllProperties() As Byte()
Dim PropBag As New PropertyBag
PropBag.WriteProperty "TheDate", TheDate, 0
PropBag.WriteProperty "kp", kp, 0
PropBag.WriteProperty "sp", sp, 0
PropBag.WriteProperty "hi", hi, 0
PropBag.WriteProperty "lo", lo, 0
PropBag.WriteProperty "amt", amt, 0
PropBag.WriteProperty "num", num, 0
AllProperties = PropBag.Contents
End Property

Friend Property Let AllProperties(value() As Byte)
Dim PropBag As New PropertyBag
PropBag.Contents = value()
TheDate = PropBag.ReadProperty("TheDate", 0)
kp = PropBag.ReadProperty(&qu

ClsOneDayData
Option Explicit

Public TheDate As Long
Public kp As Long
Public sp As Long
Public hi As Long
Public lo As Long
Public amt As Long
Public num As Long
--------------------------以上为数据定义部门
Friend Property Get AllProperties() As Byte()
Dim PropBag As New PropertyBag
PropBag.WriteProperty "TheDate", TheDate, 0
PropBag.WriteProperty "kp", kp, 0
PropBag.WriteProperty "sp", sp, 0
PropBag.WriteProperty "hi", hi, 0
PropBag.WriteProperty "lo", lo, 0
PropBag.WriteProperty "amt", amt, 0
PropBag.WriteProperty "num", num, 0
AllProperties = PropBag.Contents
End Property
----------------------------------以上为写如数据部门
Friend Property Let AllProperties(value() As Byte)
Dim PropBag As New PropertyBag
PropBag.Contents = value()
TheDate = PropBag.ReadProperty("TheDate&q